Hi Team,
Was able to make it work in scrapy:1.5-py3 using getattr()
response.meta['callback_url'] = response.url
response.meta['callback_method'] = callback_method.__name__
yield FormRequest(url=login_url, callback=self.after_login, formdata=form_data, meta=response.meta)
def after_login(self, response):
yield response.follow(url=response.meta['callback_url'], callback=getattr(self,response.meta['callback_method']),
meta=response.meta)
Explanation on why earlier code failed when passing function via FormRequest meta under scrapy:1.5-py3 would be helpful
watch
Hi Team,
Below FormRequest post action is working fine in python 2 for scrapy:1.5 but now working in scrapy:1.5-py3. Having callback_method information in meta dict is causing failure. Please highlight or suggest work around.