1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

[twitter] add 'protected' metadata field (#5327)

for 'author' and 'user'
This commit is contained in:
Mike Fährmann 2024-03-13 14:46:03 +01:00
parent dde822e69a
commit 108abab537
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 54 additions and 0 deletions

View File

@ -380,6 +380,7 @@ class TwitterExtractor(Extractor):
"date" : text.parse_datetime(
uget("created_at"), "%a %b %d %H:%M:%S %z %Y"),
"verified" : uget("verified", False),
"protected" : uget("protected", False),
"profile_banner" : uget("profile_banner_url", ""),
"profile_image" : uget(
"profile_image_url_https", "").replace("_normal.", "."),

View File

@ -72,6 +72,59 @@ __tests__ = (
"#class" : twitter.TwitterTimelineExtractor,
"#range" : "1-40",
"#sha1_url": "c570ac1aae38ed1463be726cc46f31cac3d82a40",
"author": {
"date" : "dt:2015-01-12 10:25:22",
"description" : "The very best nature pictures.",
"favourites_count": int,
"followers_count" : int,
"friends_count" : int,
"listed_count" : int,
"media_count" : int,
"statuses_count" : int,
"id" : 2976459548,
"location" : "Earth",
"name" : "supernaturepics",
"nick" : "Nature Pictures",
"profile_banner" : "https://pbs.twimg.com/profile_banners/2976459548/1421058583",
"profile_image" : "https://pbs.twimg.com/profile_images/554585280938659841/FLVAlX18.jpeg",
"protected" : False,
"verified" : False,
},
"user": {
"date" : "dt:2015-01-12 10:25:22",
"description" : "The very best nature pictures.",
"favourites_count": int,
"followers_count" : int,
"friends_count" : int,
"listed_count" : int,
"media_count" : int,
"statuses_count" : int,
"id" : 2976459548,
"location" : "Earth",
"name" : "supernaturepics",
"nick" : "Nature Pictures",
"profile_banner" : "https://pbs.twimg.com/profile_banners/2976459548/1421058583",
"profile_image" : "https://pbs.twimg.com/profile_images/554585280938659841/FLVAlX18.jpeg",
"protected" : False,
"verified" : False,
},
"tweet_id" : range(400000000000000000, 800000000000000000),
"conversation_id": range(400000000000000000, 800000000000000000),
"quote_id" : 0,
"reply_id" : 0,
"retweet_id" : 0,
"count" : range(1, 4),
"num" : range(1, 4),
"favorite_count" : int,
"quote_count" : int,
"reply_count" : int,
"retweet_count" : int,
"content" : str,
"lang" : str,
"date" : "type:datetime",
"sensitive" : False,
"source" : "nature_pics",
},
{