Open ZheyiXu opened 7 months ago
I am new to Python and trying to use facebook_scraper to collect data.
import facebook_scraper as fs HASHTAGID = "theone" MAX_COMMENTS = 10 MAX_POSTS = 10 gen = fs.get_posts( hashtag=HASHTAGID, options={"comments": MAX_COMMENTS, "progress": True, "time": datetime.date(2016,8,4)} ) post = next(gen) comments = post['comments_full']
But I receive error message below
--------------------------------------------------------------------------- StopIteration Traceback (most recent call last) <ipython-input-35-88c9d27c2318> in <module> 10 ) 11 ---> 12 post = next(gen) 13 #comments = post['comments_full'] 14 StopIteration:
How should I revise the code?
I am new to Python and trying to use facebook_scraper to collect data.
But I receive error message below
How should I revise the code?