summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/sexcom.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2021-12-30 01:56:41 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2021-12-30 01:56:41 -0500
commit7bc30b43b70556630b4a93c03fefc0d888e3d19f (patch)
treefb0e96762ab8137d23f248ef303538d8d6ff4368 /gallery_dl/extractor/sexcom.py
parenta5aecc343fd2886e7ae09bb3e2afeec38f175755 (diff)
New upstream version 1.20.0.upstream/1.20.0
Diffstat (limited to 'gallery_dl/extractor/sexcom.py')
-rw-r--r--gallery_dl/extractor/sexcom.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/gallery_dl/extractor/sexcom.py b/gallery_dl/extractor/sexcom.py
index ccedff3..199b1ba 100644
--- a/gallery_dl/extractor/sexcom.py
+++ b/gallery_dl/extractor/sexcom.py
@@ -78,9 +78,14 @@ class SexcomExtractor(Extractor):
path += "/hd"
data["url"] = self.root + path
else:
+ iframe = extr('<iframe', '>')
+ src = (text.extract(iframe, ' src="', '"')[0] or
+ text.extract(iframe, " src='", "'")[0])
+ if not src:
+ self.log.warning("Unable to fetch media from %s", url)
+ return None
data["extension"] = None
- data["url"] = "ytdl:" + text.extract(
- extr('<iframe', '>'), ' src="', '"')[0]
+ data["url"] = "ytdl:" + src
else:
data["url"] = text.unescape(extr(' src="', '"').partition("?")[0])
text.nameext_from_url(data["url"], data)