Skip to content

Commit 0093ee4

Browse files
committed
corrected README with uptodate data. closes #23
1 parent 1d2e8cf commit 0093ee4

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ to scrape from there (note that all keys and values in the data you pass must
4747
be strings)::
4848

4949
>>> url1 = 'http://pypi.python.org/pypi/w3lib'
50-
>>> data = {'name': 'w3lib 1.0', 'author': 'Scrapy project', 'description': 'Library of web-related functions'}
50+
>>> data = {'name': 'w3lib 1.1', 'author': 'Scrapy project', 'description': 'Library of web-related functions'}
5151
>>> s.train(url1, data)
5252

5353
Finally, tell the scraper to scrape any other similar page and it will return
@@ -101,27 +101,27 @@ To list available templates from a scraper::
101101

102102
To add a new annotation, you usually test the selection criteria first::
103103

104-
scrapely> a 0 w3lib 1.0
105-
[0] u'<a href="/pypi/w3lib/1.0">w3lib 1.0</a>'
106-
[1] u'<h1>w3lib 1.0</h1>'
107-
[2] u'<title>Python Package Index : w3lib 1.0</title>'
104+
scrapely> a 0 w3lib 1.1
105+
[0] u'<a href="/pypi/w3lib/1.1">w3lib 1.1</a>'
106+
[1] u'<h1>w3lib 1.1</h1>'
107+
[2] u'<title>Python Package Index : w3lib 1.1</title>'
108108
109109
You can refine by position. To take the one in position [1]::
110110

111-
scrapely> a 0 w3lib 1.0 -n 1
112-
[0] u'<h1>w3lib 1.0</h1>'
111+
scrapely> a 0 w3lib 1.1 -n 1
112+
[0] u'<h1>w3lib 1.1</h1>'
113113

114114
To annotate some fields on the template::
115115

116-
scrapely> a 0 w3lib 1.0 -n 1 -f name
117-
[new] (name) u'<h1>w3lib 1.0</h1>'
116+
scrapely> a 0 w3lib 1.1 -n 1 -f name
117+
[new] (name) u'<h1>w3lib 1.1</h1>'
118118
scrapely> a 0 Scrapy project -n 0 -f author
119119
[new] u'<span>Scrapy project</span>'
120120

121121
To list annotations on a template::
122122

123123
scrapely> al 0
124-
[0-0] (name) u'<h1>w3lib 1.0</h1>'
124+
[0-0] (name) u'<h1>w3lib 1.1</h1>'
125125
[0-1] (author) u'<span>Scrapy project</span>'
126126

127127
To scrape another similar page with the already added templates::

0 commit comments

Comments
 (0)