Return inner text for second page element with class .offer__content.
Bug:
Crashes with:
Traceback (most recent call last):
File "jobsiteScrape.py", line 251, in <module>
scrape_stepsone(stepstone_search_string)
File "jobsiteScrape.py", line 115, in scrape_stepstone
job_desc = soup.select('.offer__content')[1].getText()
IndexError: list index out of range
Tried:
inspected source code on website and verified the existence of two elements with the class .offer__content
dumped the soup into a txt and verified the existence of two elements with the class .offer__content in the scraped page
changed index to 0
tried different HTML parsers
tried print(job_desc) -> this prints the expected result to the terminal
Update 2018-11-08:
This is very weird. Two test runs this morning didn't show any error.
Problem in line 115:
job_desc = soup.select('.offer__content')[1].getText()
Expected behaviour:
Return inner text for second page element with class .offer__content.
Bug:
Crashes with:
Tried:
inspected source code on website and verified the existence of two elements with the class .offer__content
dumped the soup into a txt and verified the existence of two elements with the class .offer__content in the scraped page
changed index to 0
tried different HTML parsers
tried print(job_desc) -> this prints the expected result to the terminal
Update 2018-11-08:
This is very weird. Two test runs this morning didn't show any error.