Commit 632ee126 authored by Francesco Poldi's avatar Francesco Poldi

Removed profile_img_url adde user_rt_id

parent d3d9f12e
......@@ -24,7 +24,7 @@ def tweetData(t):
"retweet": t.retweet,
"quote_url": t.quote_url,
"video": t.video,
"profile_image_url": t.profile_image_url
"user_rt_id": t.user_rt_id
}
return data
......@@ -54,7 +54,7 @@ def tweetFieldnames():
"retweet",
"quote_url",
"video",
"profile_image_url"
"user_rt_id"
]
return fieldnames
......
......@@ -76,7 +76,6 @@ def Tweet(tw, location, config):
t.user_id_str = tw["data-user-id"]
t.username = tw["data-screen-name"]
t.name = tw["data-name"]
t.profile_image_url = tw.find("img", "js-action-profile-avatar").get('src').replace("_bigger","")
t.place = tw.find("a","js-geo-pivot-link").text.strip() if tw.find("a","js-geo-pivot-link") else None
t.timezone = strftime("%Z", localtime())
for img in tw.findAll("img", "Emoji Emoji--forText"):
......@@ -94,5 +93,7 @@ def Tweet(tw, location, config):
t.likes_count = getStat(tw, "favorite")
t.link = f"https://twitter.com/{t.username}/status/{t.id}"
t.retweet = getRetweet(config.Profile, t.username, config.Username)
if t.retweet:
t.user_rt_id = config.User_id
t.quote_url = getQuoteURL(tw)
return t
Markdown is supported
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