Closed epireve closed 10 months ago
Did you add: from itertools import islice
I do not know if this is still relevant, but I had the same problem. Uninstalling and then reinstalling solved it for me.
Hi.
I have used this tool many times and absolutely love it. Thank you. However, I have tried to scrape comments today (15/11/2023) and I ran into this error "JSONDecodeError: Expecting value: line 1 column 1 (char 0)", with the following code (taken from the README)
from itertools import islice
from youtube_comment_downloader import *
downloader = YoutubeCommentDownloader()
comments = downloader.get_comments_from_url('https://www.youtube.com/watch?v=ScMzIvxBSi4', sort_by=SORT_BY_POPULAR)
for comment in islice(comments, 10):
print(comment)
I have tried uninstalling and re-installing the tool however, this did not solve the problem.
This error appears when the script can't parse the response that's coming from the Youtube server. This is usually because either Youtube made changes to their server, or because Youtube is blocking you. Since the script seems to work fine for me, I'm guessing Youtube is blocking your IP.
Hi there,
Yesterday it was all fine. Been running about half a day before it spitted out JSONDecodeError.
At first, I thought it was the Pandas dataframe issues. I tried to diagnose the root. Even when I tried the example code also produced the same error.
Is it because of the generator?