mirror of
https://github.com/mikf/gallery-dl.git
synced 2025-01-31 19:51:34 +01:00
[xvideos] fix galleries with more than 500 images (#5244)
This commit is contained in:
parent
13443f40a3
commit
d3dca68225
@ -59,15 +59,29 @@ class XvideosGalleryExtractor(XvideosBase, GalleryExtractor):
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@staticmethod
|
def images(self, page):
|
||||||
def images(page):
|
results = [
|
||||||
"""Return a list of all image urls for this gallery"""
|
|
||||||
return [
|
|
||||||
(url, None)
|
(url, None)
|
||||||
for url in text.extract_iter(
|
for url in text.extract_iter(
|
||||||
page, '<a class="embed-responsive-item" href="', '"')
|
page, '<a class="embed-responsive-item" href="', '"')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if not results:
|
||||||
|
return
|
||||||
|
|
||||||
|
while len(results) % 500 == 0:
|
||||||
|
path = text.rextract(page, ' href="', '"', page.find(">Next</"))[0]
|
||||||
|
if not path:
|
||||||
|
break
|
||||||
|
page = self.request(self.root + path).text
|
||||||
|
results.extend(
|
||||||
|
(url, None)
|
||||||
|
for url in text.extract_iter(
|
||||||
|
page, '<a class="embed-responsive-item" href="', '"')
|
||||||
|
)
|
||||||
|
|
||||||
|
return results
|
||||||
|
|
||||||
|
|
||||||
class XvideosUserExtractor(XvideosBase, Extractor):
|
class XvideosUserExtractor(XvideosBase, Extractor):
|
||||||
"""Extractor for user profiles on xvideos.com"""
|
"""Extractor for user profiles on xvideos.com"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user