-
Notifications
You must be signed in to change notification settings - Fork 35
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
json.decoder.JSONDecodeError #2
Comments
I could not replicate that, but the latest commit 43aa262 should at least make it fail gracefully and not stop the scraping process. I'll leave this open for now - let me know if you figure a way to consistently replicate that or if it fails with a specific book in particular. |
It's still failing. :\ I am able to download few books 1 or 2 at a time then process gets stopped with this error, then I have rerun the command to scrape more books.
|
I am getting the same error when scraping the second book on a new clone on ca0d913. |
I might found the cause: The error occurs after accepting the cookies inside the ChromeDriver window. When not interacting with the Chrome window, the program seems to work like expected. |
My bad, latest commit 426d5bd should fix the handling of the exception. Again, it will not fix the bug but at least it should handle it without stopping the program and provide some more information about what's failing. @Wunderharke Interesting! I never touch the Chrome window while scraping anyway, since it's all automated - just let it do its job. @mikan01 can you confirm if that makes it better for you too? |
Thank you, now the problem seems to be fixed. :) |
@mikan01, Thanks! |
New Captcha Behaviour and dependencies
Hi,
I keep getting this error after scraping few books (3 to 4 books). Please help
Traceback (most recent call last): File "main.py", line 62, in <module> audio_files = scraper.scrape_book_audio(driver, book_json) File "C:\Users\Fang Yuan\Downloads\blinkist-scraper-master\scraper.py", line 223, in scrape_book_audio audio_url = audio_request.json()['url'] File "C:\Python38\lib\site-packages\requests\models.py", line 888, in json return complexjson.loads( File "C:\Python38\lib\json\__init__.py", line 357, in loads return _default_decoder.decode(s) File "C:\Python38\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Python38\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The text was updated successfully, but these errors were encountered: