-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,25 @@ | ||
# TableScraper.jl | ||
Easy to scrape tables from webapges | ||
|
||
In this package there is only one function | ||
|
||
`scrape_tables(url)` | ||
|
||
which lets you scrape for tables wrapped in `<table>` tag and return them in a [Tables.jl](https://github.com/JuliaData/Tables.jl) compatible row-table. | ||
|
||
By default the function uses `Cascadia.nodeText` to extract the text from each `<td>` node. | ||
|
||
However, if you wish to extract more than the text node you may use | ||
|
||
``` | ||
scrape_tables(url, identity) | ||
``` | ||
|
||
to keep the cells as `Gumbo.HTMLNode`s and do more advanced extraction. | ||
|
||
Also, you can put any call into the `cell_transform` argument to do custome transformation of the `<td>` nodes before returning. | ||
|
||
E.g. | ||
|
||
``` | ||
scrape_tables(url, cell_transform) | ||
``` |