[patreon] get partial user info without /api/user/<id> (#507)
It's a lot less data, but doesn't invoke any additional HTTP requests with potential Cloudflare CAPTCHAs.
This commit is contained in:
parent
0ab9bb1721
commit
c9ef1b21c3
@ -97,8 +97,8 @@ class PatreonExtractor(Extractor):
|
|||||||
attr["attachments"] = self._files(post, included, "attachments")
|
attr["attachments"] = self._files(post, included, "attachments")
|
||||||
attr["date"] = text.parse_datetime(
|
attr["date"] = text.parse_datetime(
|
||||||
attr["published_at"], "%Y-%m-%dT%H:%M:%S.%f%z")
|
attr["published_at"], "%Y-%m-%dT%H:%M:%S.%f%z")
|
||||||
attr["creator"] = self._user(
|
uid = post["relationships"]["user"]["data"]["id"]
|
||||||
post["relationships"]["user"]["links"]["related"])
|
attr["creator"] = included["user"][uid]
|
||||||
return attr
|
return attr
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
Loading…
x
Reference in New Issue
Block a user