[instagram] extract 'coauthors' metadata (#3107)

pull/3119/head
Mike Fährmann 2 years ago
parent 7c6af27eb8
commit f168ec9572
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -172,6 +172,15 @@ class InstagramExtractor(Extractor):
data["location_url"] = "{}/explore/locations/{}/{}/".format(
self.root, location["pk"], slug)
coauthors = post.get("coauthor_producers")
if coauthors:
data["coauthors"] = [
{"id" : user["pk"],
"username" : user["username"],
"full_name": user["full_name"]}
for user in coauthors
]
if "carousel_media" in post:
items = post["carousel_media"]
data["sidecar_media_id"] = data["post_id"]
@ -266,6 +275,14 @@ class InstagramExtractor(Extractor):
data["location_url"] = "{}/explore/locations/{}/{}/".format(
self.root, location["id"], location["slug"])
coauthors = post.get("coauthor_producers")
if coauthors:
data["coauthors"] = [
{"id" : user["id"],
"username": user["username"]}
for user in coauthors
]
data["_files"] = files = []
if "edge_sidecar_to_children" in post:
for num, edge in enumerate(

Loading…
Cancel
Save