Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

WebdriverRequest can't callback parse_item #13

Open
bobohb opened this issue Dec 3, 2014 · 0 comments
Open

WebdriverRequest can't callback parse_item #13

bobohb opened this issue Dec 3, 2014 · 0 comments

Comments

@bobohb
Copy link

bobohb commented Dec 3, 2014

class MySpider(CrawlSpider):
start_urls = [
"http://www.example.com",
]
rules = (
Rule(
LxmlLinkExtractor(
allow=[r'\w+/\d+$', r'\w+/\d+-p\d+$'],
),
follow=True
),
Rule(
LxmlLinkExtractor(
allow=(r'\d+.html$'),
),
'parse_action',
),
)
def parse_action(self, response):
yield WebdriverRequest(response.url,
callback=self.parse_item)

def parse_item(self, response):
self.log('received for %s' % response.url, level=log.WARNING)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant