diff options
Diffstat (limited to 'gallery_dl/extractor/sexcom.py')
| -rw-r--r-- | gallery_dl/extractor/sexcom.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gallery_dl/extractor/sexcom.py b/gallery_dl/extractor/sexcom.py index 38b7813..c4597af 100644 --- a/gallery_dl/extractor/sexcom.py +++ b/gallery_dl/extractor/sexcom.py @@ -21,6 +21,7 @@ class SexcomExtractor(Extractor): root = "https://www.sex.com" def items(self): + self.session.headers["Referer"] = self.root yield Message.Version, 1 yield Message.Directory, self.metadata() for pin in map(self._parse_pin, self.pins()): @@ -52,7 +53,7 @@ class SexcomExtractor(Extractor): def _parse_pin(self, url): response = self.request(url, fatal=False) if response.status_code >= 400: - self.log.warning('Unable to fetch %s ("%s: %s")', + self.log.warning('Unable to fetch %s ("%s %s")', url, response.status_code, response.reason) return None extr = text.extract_from(response.text) @@ -102,6 +103,7 @@ class SexcomPinExtractor(SexcomExtractor): # picture ("https://www.sex.com/pin/56714360/", { "url": "599190d6e3d79f9f49dda194a0a58cb0ffa3ab86", + "content": "963ed681cf53904173c7581b713c7f9471f04db0", "keyword": { "comments": int, "date": "2018-10-02T21:18:17-04:00", @@ -150,7 +152,7 @@ class SexcomRelatedPinExtractor(SexcomPinExtractor): directory_fmt = ("{category}", "related {original_pin[pin_id]}") pattern = r"(?:https?://)?(?:www\.)?sex\.com/pin/(\d+).*#related$" test = ("https://www.sex.com/pin/56714360/#related", { - "count": 24, + "count": ">= 22", }) def metadata(self): |
