mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 04:02:32 +01:00
[xvideos] support '/channels/' URLs (#5244)
This commit is contained in:
parent
c60ebc6519
commit
13443f40a3
@ -11,6 +11,9 @@
|
||||
from .common import GalleryExtractor, Extractor, Message
|
||||
from .. import text, util
|
||||
|
||||
BASE_PATTERN = (r"(?:https?://)?(?:www\.)?xvideos\.com"
|
||||
r"/(?:profiles|(?:amateur-|model-)?channels)")
|
||||
|
||||
|
||||
class XvideosBase():
|
||||
"""Base class for xvideos extractors"""
|
||||
@ -25,9 +28,7 @@ class XvideosGalleryExtractor(XvideosBase, GalleryExtractor):
|
||||
"{gallery[id]} {gallery[title]}")
|
||||
filename_fmt = "{category}_{gallery[id]}_{num:>03}.{extension}"
|
||||
archive_fmt = "{gallery[id]}_{num}"
|
||||
pattern = (r"(?:https?://)?(?:www\.)?xvideos\.com"
|
||||
r"/(?:profiles|amateur-channels|model-channels)"
|
||||
r"/([^/?#]+)/photos/(\d+)")
|
||||
pattern = BASE_PATTERN + r"/([^/?#]+)/photos/(\d+)"
|
||||
example = "https://www.xvideos.com/profiles/USER/photos/12345"
|
||||
|
||||
def __init__(self, match):
|
||||
@ -72,8 +73,7 @@ class XvideosUserExtractor(XvideosBase, Extractor):
|
||||
"""Extractor for user profiles on xvideos.com"""
|
||||
subcategory = "user"
|
||||
categorytransfer = True
|
||||
pattern = (r"(?:https?://)?(?:www\.)?xvideos\.com"
|
||||
r"/profiles/([^/?#]+)/?(?:#.*)?$")
|
||||
pattern = BASE_PATTERN + r"/([^/?#]+)/?(?:#.*)?$"
|
||||
example = "https://www.xvideos.com/profiles/USER"
|
||||
|
||||
def __init__(self, match):
|
||||
|
@ -41,6 +41,13 @@ __tests__ = (
|
||||
"#class" : xvideos.XvideosGalleryExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://www.xvideos.com/channels/pervertedcouple/photos/12",
|
||||
"#comment" : "/channels/ URL (#5244)",
|
||||
"#category": ("", "xvideos", "gallery"),
|
||||
"#class" : xvideos.XvideosGalleryExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://www.xvideos.com/profiles/pervertedcouple",
|
||||
"#category": ("", "xvideos", "user"),
|
||||
@ -55,4 +62,22 @@ __tests__ = (
|
||||
"#class" : xvideos.XvideosUserExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://www.xvideos.com/channels/pervertedcouple",
|
||||
"#category": ("", "xvideos", "user"),
|
||||
"#class" : xvideos.XvideosUserExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://www.xvideos.com/amateur-channels/pervertedcouple",
|
||||
"#category": ("", "xvideos", "user"),
|
||||
"#class" : xvideos.XvideosUserExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://www.xvideos.com/model-channels/pervertedcouple",
|
||||
"#category": ("", "xvideos", "user"),
|
||||
"#class" : xvideos.XvideosUserExtractor,
|
||||
},
|
||||
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user