summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/sexcom.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2019-11-10 22:14:10 -0500
committerLibravatarUnit 193 <unit193@ubuntu.com>2019-11-10 22:14:10 -0500
commit0c73e982fa596da07f23b377621ab894a9e64884 (patch)
tree96f6a40a5656c15a2ec7217a8a1efcff5827bcbb /gallery_dl/extractor/sexcom.py
parent40f5fe6edef268632d3bc484e85e5b37bad67bff (diff)
New upstream version 1.11.1upstream/1.11.1
Diffstat (limited to 'gallery_dl/extractor/sexcom.py')
-rw-r--r--gallery_dl/extractor/sexcom.py6
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):