You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, thank you very much for sharing this nice tool.
However, I have an issue. I use Jupiter Notebook with the default settings (e.g., search a term using random instances). After a while, I get, e.g. 02-Jan-24 12:40:55 - Empty page on https://nitter.soopy.moe/
Since I would like to fetch a large number of tweets, I would like to skip this and restart from where it stopped. Is that possible?
The text was updated successfully, but these errors were encountered:
!pipinstallntscrapertqdmfromntscraperimportNitterfromdatetimeimportdatetime, timedelta, datescraper=Nitter(log_level=1, skip_instance_check=False)
user="visakanv"# replace with the person you want to scrapecache= []
date=date.today() # defaults to the day of query, please note for debuggingwhileTrue:
dl_tweets=scraper.get_tweets(user, mode='user', until=str(date))['tweets']
iflen(dl_tweets) ==0: break# break if end of history is reachedelse: cache.extend(dl_tweets) # cache list concatenationdate_str=dl_tweets[-1]['date'][:12] # get the date string to convert, forget the time and timezonesdate=datetime.strptime(date_str, '%b %d, %Y').date() +timedelta(days=1) # Get Twitter date format
Would convert the output into a DataFrame if I have the time but atm it seems to work
Hello, thank you very much for sharing this nice tool.
However, I have an issue. I use Jupiter Notebook with the default settings (e.g., search a term using random instances). After a while, I get, e.g. 02-Jan-24 12:40:55 - Empty page on https://nitter.soopy.moe/
Since I would like to fetch a large number of tweets, I would like to skip this and restart from where it stopped. Is that possible?
The text was updated successfully, but these errors were encountered: