mirror of
https://github.com/ericchiang/pup
synced 2024-11-24 08:58:08 +00:00
dead links changed and version bumped
This commit is contained in:
parent
40f7f533c4
commit
c1e6f93da9
24
README.md
24
README.md
@ -22,14 +22,13 @@ Or if you can run `go get` to download via git.
|
|||||||
## Quick start
|
## Quick start
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ curl http://www.pro-football-reference.com/years/2013/games.htm
|
$ curl -s https://news.ycombinator.com/
|
||||||
```
|
```
|
||||||
|
|
||||||
Ew, HTML. Let's run that through some pup selectors:
|
Ew, HTML. Let's run that through some pup selectors:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ curl http://www.pro-football-reference.com/years/2013/games.htm | \
|
$ curl -s https://news.ycombinator.com/ | pup 'td.title a[href^=http] attr{href}'
|
||||||
pup table#games 'a[href*=boxscores]' attr{href}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Basic Usage
|
## Basic Usage
|
||||||
@ -159,25 +158,6 @@ $ pup < robots.html a slice{:3}
|
|||||||
</a>
|
</a>
|
||||||
```
|
```
|
||||||
|
|
||||||
The `by` indexer works particularly well with tables.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ curl -s http://www.pro-football-reference.com/boxscores/201402020den.htm | \
|
|
||||||
pup table#linescore td slice{::6}
|
|
||||||
<td align="left">
|
|
||||||
<a href="/teams/sea/2013.htm">
|
|
||||||
Seattle Seahawks
|
|
||||||
</a>
|
|
||||||
(13-3-0)
|
|
||||||
</td>
|
|
||||||
<td align="left">
|
|
||||||
<a href="/teams/den/2013.htm">
|
|
||||||
Denver Broncos
|
|
||||||
</a>
|
|
||||||
(13-3-0)
|
|
||||||
</td>
|
|
||||||
```
|
|
||||||
|
|
||||||
## Implemented Selectors
|
## Implemented Selectors
|
||||||
|
|
||||||
For further examples of these selectors head over to [w3schools](
|
For further examples of these selectors head over to [w3schools](
|
||||||
|
Loading…
Reference in New Issue
Block a user