Commit 54f22e1f authored by Oscar Araque's avatar Oscar Araque
Browse files

minor bug in twitter scraper - tweet id was not being parsed correctly

parent 10dbcadf
......@@ -39,12 +39,13 @@ def retrieveTweets(querytype, query, count=0, keep=False, library="snscrape", be
full_query = full_query + ' until:{}'.format(before)
if after:
full_query = full_query + ' since:{}'.format(after)
scraper = twitter.TwitterSearchScraper(full_query)
for tweet in scraper.get_items():
mytweet = {}
mytweet["@type"] = ["schema:BlogPosting", ]
mytweet["@id"] = tweet.id
mytweet["@id"] = str(tweet.id)
mytweet["schema:about"] = query
mytweet["schema:search"] = query
mytweet["schema:articleBody"] = tweet.content
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment