[batoto] replace k-subdomain image URLs with n-subdomain (#8791)
* [batoto] replace k-subdomain image URLs with n-subdomain
Update tests to use battwo.com proxy domain and current metadata
* [batoto] revert to list comprehension
This commit is contained in:
@@ -127,11 +127,13 @@ class BatotoChapterExtractor(BatotoBase, ChapterExtractor):
|
||||
}
|
||||
|
||||
def images(self, page):
|
||||
images_container = text.extr(page, 'pageOpts', ':[0,0]}"')
|
||||
images_container = text.unescape(images_container)
|
||||
container = text.unescape(text.extr(page, 'pageOpts', ':[0,0]}"'))
|
||||
|
||||
return [
|
||||
(url, None)
|
||||
for url in text.extract_iter(images_container, r"\"", r"\"")
|
||||
((url.replace("://k", "://n", 1)
|
||||
if url.startswith("https://k") and ".mb" in url else
|
||||
url), None)
|
||||
for url in text.extract_iter(container, r"\"", r"\"")
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user