Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Spider error processing <GET #37

Open
rammurti84 opened this issue Mar 2, 2018 · 1 comment
Open

ERROR: Spider error processing <GET #37

rammurti84 opened this issue Mar 2, 2018 · 1 comment

Comments

@rammurti84
Copy link

2018-03-02 22:15:34 [scrapy.core.scraper] ERROR: Spider error processing <GET https://www.safaribooksonline.com/api/v1/book/9781449342562/chapter-content/ch01.html> (referer: https://www.safaribooksonline.com//api/v1/book/9781449342562/chapter/ch01.html)
Traceback (most recent call last):
File "c:\python27\lib\site-packages\scrapy\utils\defer.py", line 102, in iter_errback
yield next(it)
File "c:\python27\lib\site-packages\scrapy\spidermiddlewares\offsite.py", line 30, in process_spider_output
for x in result:
File "c:\python27\lib\site-packages\scrapy\spidermiddlewares\referer.py", line 339, in
return (_set_referer(r) for r in result or ())
File "c:\python27\lib\site-packages\scrapy\spidermiddlewares\urllength.py", line 37, in
return (r for r in result or () if _filter(r))
File "c:\python27\lib\site-packages\scrapy\spidermiddlewares\depth.py", line 58, in
return (r for r in result or () if _filter(r))
File "c:\python27\lib\site-packages\safaribooks\spiders\safaribooks.py", line 179, in parse_page
fh.write(template.render(body=body, style=style))
File "c:\python27\lib\site-packages\jinja2\environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "c:\python27\lib\site-packages\jinja2\environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "", line 9, in top-level template code

@andrewvn2010
Copy link

I fixed this by removing the last / in url variable in safaribooks.py

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

No branches or pull requests

2 participants