@@ -47,7 +47,7 @@ to scrape from there (note that all keys and values in the data you pass must
4747be 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
5353Finally, 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
102102To 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
109109You 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
114114To 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
121121To 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
127127To scrape another similar page with the already added templates::
0 commit comments