From ae6748996a4f3c8a097cb7a1a9b41850337aa311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 21 Dec 2020 01:20:16 +0100 Subject: [PATCH] [pornhub] update tests --- gallery_dl/extractor/pornhub.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/gallery_dl/extractor/pornhub.py b/gallery_dl/extractor/pornhub.py index 1856c825..61e3d41c 100644 --- a/gallery_dl/extractor/pornhub.py +++ b/gallery_dl/extractor/pornhub.py @@ -29,26 +29,26 @@ class PornhubGalleryExtractor(PornhubExtractor): archive_fmt = "{id}" pattern = BASE_PATTERN + r"/album/(\d+)" test = ( - ("https://www.pornhub.com/album/17218841", { + ("https://www.pornhub.com/album/19289801", { "pattern": r"https://\w+.phncdn.com/pics/albums/\d+/\d+/\d+/\d+/", - "count": 81, + "count": 308, "keyword": { - "id": int, - "num": int, - "score": int, - "views": int, + "id" : int, + "num" : int, + "score" : int, + "views" : int, "caption": str, - "user": "Unknown", + "user" : "Danika Mori", "gallery": { - "id" : 17218841, + "id" : 19289801, "score": int, "views": int, "tags" : list, - "title": "Hentai/Ecchi 41", + "title": "Danika Mori Best Moments", }, }, }), - ("https://www.pornhub.com/album/37180171", { + ("https://www.pornhub.com/album/69040172", { "exception": exception.AuthorizationError, }), ) @@ -118,10 +118,10 @@ class PornhubGalleryExtractor(PornhubExtractor): class PornhubUserExtractor(PornhubExtractor): """Extractor for all galleries of a pornhub user""" subcategory = "user" - pattern = (BASE_PATTERN + r"/(users|model)/([^/?#]+)" + pattern = (BASE_PATTERN + r"/(users|model|pornstar)/([^/?#]+)" "(?:/photos(?:/(public|private|favorites))?)?/?$") test = ( - ("https://www.pornhub.com/users/flyings0l0/photos/public", { + ("https://www.pornhub.com/pornstar/danika-mori/photos", { "pattern": PornhubGalleryExtractor.pattern, "count": ">= 6", }),