Skip to content

Commit

Permalink
[patreon] get partial user info without /api/user/<id> (#507)
Browse files Browse the repository at this point in the history
It's a lot less data, but doesn't invoke any additional
HTTP requests with potential Cloudflare CAPTCHAs.
  • Loading branch information
mikf committed Dec 9, 2019
1 parent 0ab9bb1 commit c9ef1b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gallery_dl/extractor/patreon.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ def _process(self, post, included):
attr["attachments"] = self._files(post, included, "attachments")
attr["date"] = text.parse_datetime(
attr["published_at"], "%Y-%m-%dT%H:%M:%S.%f%z")
attr["creator"] = self._user(
post["relationships"]["user"]["links"]["related"])
uid = post["relationships"]["user"]["data"]["id"]
attr["creator"] = included["user"][uid]
return attr

@staticmethod
Expand Down

0 comments on commit c9ef1b2

Please sign in to comment.