Hello,
I would like to intercept (in a url) all the h1 (frequently the url have
more than one)
I try this
In the file items.py
class DmozItem(Item):
h1_1 = Field()
h1_2 = Field()
h1_3 = Field()
And in the spider
[...]
def parse(self, response):
hxs = HtmlXPathSelector(response)
item = DmozItem()
for i in range (1,3):
item['h1_'i] = hxs.select('//h1/text()').extract()
[...]
Unfortunately this don't work the variable i in "item['h1'_i]" return an
error
And i am not sur to intercept (with this method) all the h1
Could you please help me ?
Thanks in advance
Regards
--
You received this message because you are subscribed to the Google Groups
"scrapy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/groups/opt_out.