diff --git a/docs/supportedsites.md b/docs/supportedsites.md index efe81730..1e5d48e0 100644 --- a/docs/supportedsites.md +++ b/docs/supportedsites.md @@ -841,6 +841,12 @@ Consider all listed sites to potentially be NSFW. Galleries, Search Results, Tag Searches + + PORNSTARS.TUBE + https://pornstars.tube/ + Galleries + + R34 Vault https://rule34vault.com/ diff --git a/gallery_dl/extractor/__init__.py b/gallery_dl/extractor/__init__.py index 541a1b61..dcc211f2 100644 --- a/gallery_dl/extractor/__init__.py +++ b/gallery_dl/extractor/__init__.py @@ -161,6 +161,7 @@ modules = [ "poringa", "pornhub", "pornpics", + "pornstarstube", "postmill", "rawkuma", "reactor", diff --git a/gallery_dl/extractor/pornstarstube.py b/gallery_dl/extractor/pornstarstube.py new file mode 100644 index 00000000..82519a0e --- /dev/null +++ b/gallery_dl/extractor/pornstarstube.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. + +"""Extractors for https://pornstars.tube/""" + +from .common import GalleryExtractor +from .. import text + + +class PornstarstubeGalleryExtractor(GalleryExtractor): + """Extractor for image galleries from pornstars.tube""" + category = "pornstarstube" + root = "https://pornstars.tube" + pattern = (r"(?:https?://)?(?:www\.)?pornstars\.tube" + r"/albums/(\d+)(?:/([\w-]+))?") + example = "https://pornstars.tube/albums/12345/SLUG/" + + def __init__(self, match): + url = f"{self.root}/albums/{match[1]}/{match[2] or 'a'}/" + GalleryExtractor.__init__(self, match, url) + + def metadata(self, page): + gid, slug = self.groups + return { + "gallery_id": text.parse_int(gid), + "slug" : slug or "", + "title" : text.unescape(text.extr( + page, "", " - PORNSTARS.TUBE")), + "description": text.unescape(text.extr( + page, 'name="description" content="', '"')), + "tags": text.extr( + page, 'name="keywords" content="', '"').split(", "), + } + + def images(self, page): + album = text.extr(page, 'class="block-album"', "\n") + return [ + (url, None) + for url in text.extract_iter(album, ' href="', '"') + ] diff --git a/scripts/supportedsites.py b/scripts/supportedsites.py index 8278ed80..b520a397 100755 --- a/scripts/supportedsites.py +++ b/scripts/supportedsites.py @@ -151,6 +151,7 @@ CATEGORY_MAP = { "pornimage" : "Porn Image", "pornpics" : "PornPics.com", "pornreactor" : "PornReactor", + "pornstarstube" : "PORNSTARS.TUBE", "postimg" : "Postimages", "readcomiconline": "Read Comic Online", "redbust" : "RedBust", diff --git a/test/results/pornstarstube.py b/test/results/pornstarstube.py new file mode 100644 index 00000000..592fd9dc --- /dev/null +++ b/test/results/pornstarstube.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. + +from gallery_dl.extractor import pornstarstube + + +__tests__ = ( +{ + "#url" : "https://pornstars.tube/albums/40771/cleaning-leads-to-delicious-mess/", + "#class" : pornstarstube.PornstarstubeGalleryExtractor, + "#pattern" : r"https://pics\-storage\-1\.pornhat\.com/contents/albums/main/1920x1080/40000/40771/\d+\.jpg", + "#count" : 100, + + "count" : 100, + "num" : range(1, 100), + "description": "When stepson Brad Sterling decides to help out his stepmom Cali Lee and do a deep clean of the kitchen, he wasn’t expecting her to be so grateful for it. Cali offers to reward him for all his hard work in a much devious way. Who knew that a little bit of cleaning would lead to such messy results!", + "extension" : "jpg", + "filename" : r"re:^\d+$", + "gallery_id" : 40771, + "slug" : "cleaning-leads-to-delicious-mess", + "title" : "Cleaning Leads To Delicious Mess", + "tags" : [ + "blowjob", + "oral", + "brunette", + "teen (18+)", + "cowgirl", + "latina", + "missionary", + "handjob", + "babe", + "standing doggystyle", + "side fuck", + "reverse cowgirl", + "deep throat", + "kitchen", + "posing", + "stripping", + "firm ass", + "legs on shoulders", + "Cali Lee", + ], +}, + +{ + "#url" : "https://pornstars.tube/albums/40771/cleaning", + "#class" : pornstarstube.PornstarstubeGalleryExtractor, +}, + +{ + "#url" : "https://pornstars.tube/albums/40771-O", + "#class" : pornstarstube.PornstarstubeGalleryExtractor, +}, + +)