Closed Freelix123 closed 4 years ago
Tested it, works just fine. Check the url
the script is using, if you typed everything right.
Maybe check the versions you are using, e.g. BeautifulSoup?!
$ pip freeze|grep "beautifulsoup4"
beautifulsoup4==4.6.3
Sorry for the confusion. I have deinstalled and reinstalled Anconda. It runs perfectly fine again...
What was the problem? Beautifulsoup version issue or another problem?
Yes, it was Beautifulsoup, the latest Version(4.9.1) has apparently an issue, that text property is always null
Thanks, raouldke! I hadn't had the time to look this up, but this explenation fits 100% to my issue!
I just got started with Python as I was interessted in Immo data and wanted to produce my own scrapes. I found your instruction very helpful. My Scraper was running perfectly fine for a month. Thank you! But since the beginning of June I get the following error:
'NoneType' object is not subscriptable
The problems stems from looping through the scripts list and finding the script with the term 'IS24.resultList'
Line 60: soup = BeautifulSoup(urlquery(url), 'html.parser') scripts = soup.findAll('script') for script in scripts:
print script.text.strip()
the script.text.strip() command does no longer output any text. I have tried many variations, but don t get it to work. I am currently going through the bs4 documentation to seek alternatives. For me the problem came up after a spyder update. Though, I don t know whether this stands in any relation with the appearence of the problem. Maybe you can help?