Skip to content

Commit

Permalink
[cyberdrop] add fallback URLs (#2668)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Jun 13, 2022
1 parent 834e900 commit 78d8334
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gallery_dl/extractor/cyberdrop.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ def fetch_album(self, album_id):
files = []
append = files.append
while True:
url = extr('id="file" href="', '"')
url = text.unescape(extr('id="file" href="', '"'))
if not url:
break
append({"file": text.unescape(url)})
append({"file": url,
"_fallback": (self.root + url[url.find("/", 8):],)})

return files, {
"album_id" : self.album_id,
Expand Down
2 changes: 2 additions & 0 deletions gallery_dl/extractor/lolisafe.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def items(self):
yield Message.Directory, data
for data["num"], file in enumerate(files, 1):
url = file["file"]
if "_fallback" in file:
data["_fallback"] = file["_fallback"]
text.nameext_from_url(url, data)
data["name"], sep, data["id"] = data["filename"].rpartition("-")

Expand Down

0 comments on commit 78d8334

Please sign in to comment.