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

"IndexError: list index out of range" while fetching newsletter #63

Closed
oujesky opened this issue Apr 2, 2017 · 2 comments
Closed

"IndexError: list index out of range" while fetching newsletter #63

oujesky opened this issue Apr 2, 2017 · 2 comments

Comments

@oujesky
Copy link

oujesky commented Apr 2, 2017

Since this week's newsletter, it started to throw the following exception. My guess is, that the structure of the landing page changed somewhat.

[*] fetching url... 200 | https://www.packtpub.com/packt/free-ebook/what-you-need-know-about-angular-2
[-] <type 'exceptions.IndexError'> list index out of range | spider.py@125
Traceback (most recent call last):
  File "script/spider.py", line 125, in main
    packtpub.runNewsletter(currentNewsletterUrl)
  File "/home/mira/packtpub-crawler/script/packtpub.py", line 169, in runNewsletter
    self.__parseNewsletterBookInfo(soup)
  File "/home/mira/packtpub-crawler/script/packtpub.py", line 101, in __parseNewsletterBookInfo
    urlWithTitle = div_target.select('div.promo-landing-book-picture a')[0]['href']
IndexError: list index out of range
@oujesky oujesky changed the title IndexError: list index out of range while fetching newsletter "IndexError: list index out of range" while fetching newsletter Apr 2, 2017
@juzim
Copy link
Contributor

juzim commented Apr 2, 2017 via email

@niqdev
Copy link
Owner

niqdev commented Apr 2, 2017

Thanks, yep the page is different

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

No branches or pull requests

3 participants