Skip to content

Commit

Permalink
[kemonoparty] send Referer headers (#2989, #2990)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Oct 1, 2022
1 parent 98f67ae commit b84982b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gallery_dl/extractor/kemonoparty.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def __init__(self, match):
self.cookiedomain = ".coomer.party"
self.root = text.root_from_url(match.group(0))
Extractor.__init__(self, match)
self.session.headers["Referer"] = self.root + "/"

def items(self):
self._prepare_ddosguard_cookies()
Expand Down Expand Up @@ -63,6 +64,8 @@ def items(self):

for post in posts:

headers["Referer"] = "{}/{}/user/{}/post/{}".format(
self.root, post["service"], post["user"], post["id"])
post["_http_headers"] = headers
post["date"] = text.parse_datetime(
post["published"] or post["added"],
Expand Down

0 comments on commit b84982b

Please sign in to comment.