diff options
| author | 2022-04-29 01:58:56 -0400 | |
|---|---|---|
| committer | 2022-04-29 01:58:56 -0400 | |
| commit | c6b88a96bd191711fc540d7babab3d2e09c68da8 (patch) | |
| tree | 288f3641ea19865740191b452da8832021772b8c /gallery_dl/extractor/sexcom.py | |
| parent | 2fe1dfed848fc26b7419e3bfe91a62e686960429 (diff) | |
New upstream version 1.21.2.upstream/1.21.2
Diffstat (limited to 'gallery_dl/extractor/sexcom.py')
| -rw-r--r-- | gallery_dl/extractor/sexcom.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gallery_dl/extractor/sexcom.py b/gallery_dl/extractor/sexcom.py index edf35da..830274a 100644 --- a/gallery_dl/extractor/sexcom.py +++ b/gallery_dl/extractor/sexcom.py @@ -87,7 +87,10 @@ class SexcomExtractor(Extractor): data["extension"] = None data["url"] = "ytdl:" + src else: - data["url"] = text.unescape(extr(' src="', '"').partition("?")[0]) + data["_http_validate"] = _check_empty + url = text.unescape(extr(' src="', '"')) + data["url"] = url.partition("?")[0] + data["_fallback"] = (url,) text.nameext_from_url(data["url"], data) data["uploader"] = extr('itemprop="author">', '<') @@ -247,3 +250,7 @@ class SexcomSearchExtractor(SexcomExtractor): def pins(self): url = "{}/{}".format(self.root, self.path) return self._pagination(url) + + +def _check_empty(response): + return response.headers.get("content-length") != "0" |
