Tryin to run a sentiment analysis on entire dataset, but I can only thumb through one at a time. I have the code for the sentiment analysis, but I can't seem to figure out how to iterate through all pages and print them all to then run the SA. Please see what I have tried below:
Cell 1:
bitcoin_news = newsapi.get_everything(q="bitcoin", language="en", sort_by="publishedAt", page=99, page_size=100)
Cell 1a (code I've tried):
def get_and_print_data(bitcoin_news):
r = bitcoin_news
for i in r:
print(i)
if r.get('next'):
get_and_print_data(info['next'])
return get_and_print_data
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…