Skip to content

Commit

Permalink
[simplyhentai] avoid redirects for all-pages.json (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Jun 1, 2018
1 parent ad14de1 commit a47c613
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 0 additions & 5 deletions gallery_dl/extractor/mangadex.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ class MangadexChapterExtractor(MangadexExtractor, ChapterExtractor):
"count": 64,
"keyword": "1f6fb237a96cdf05b436ae2a37a4436e717bbb30",
}),
# abnormal chapter string ("Vol. 1 Ch. 6 \ 5.1")
("https://mangadex.org/chapter/255540", {
"count": 27,
"keyword": "fe5e3ece1bc6463350fde36f7e47e29d093fed84",
}),
# NotFoundError
("https://mangadex.org/chapter/1", {
"exception": exception.NotFoundError,
Expand Down
3 changes: 2 additions & 1 deletion gallery_dl/extractor/simplyhentai.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def get_metadata(self, page):
}

def get_images(self, _):
images = self.request(self.url + "/all-pages.json").json()
headers = {"Accept": "application/json"}
images = self.request(self.url + "/all-pages", headers=headers).json()
return [
(urls["full"], {"image_id": text.parse_int(image_id)})
for image_id, urls in sorted(images.items())
Expand Down
1 change: 1 addition & 0 deletions test/test_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

# temporary issues, etc.
BROKEN = {
"dokireader", # server down
}


Expand Down

0 comments on commit a47c613

Please sign in to comment.