[pornstarstube] add support (#8576)
* Add support for pornstars.tube
* update
- adjust pattern/example/page_url
- extract '' & '' metadata
- prevent unnecessary request
- fix result URLs
- return list comprehension result
* update supportedsites
* update test results
* fix extractor name
---------
Co-authored-by: Mike Fährmann <mike_faehrmann@web.de>
This commit is contained in:
@@ -841,6 +841,12 @@ Consider all listed sites to potentially be NSFW.
|
||||
<td>Galleries, Search Results, Tag Searches</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr id="pornstarstube" title="pornstarstube">
|
||||
<td>PORNSTARS.TUBE</td>
|
||||
<td>https://pornstars.tube/</td>
|
||||
<td>Galleries</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr id="rule34vault" title="rule34vault">
|
||||
<td>R34 Vault</td>
|
||||
<td>https://rule34vault.com/</td>
|
||||
|
||||
@@ -161,6 +161,7 @@ modules = [
|
||||
"poringa",
|
||||
"pornhub",
|
||||
"pornpics",
|
||||
"pornstarstube",
|
||||
"postmill",
|
||||
"rawkuma",
|
||||
"reactor",
|
||||
|
||||
43
gallery_dl/extractor/pornstarstube.py
Normal file
43
gallery_dl/extractor/pornstarstube.py
Normal file
@@ -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, "<title>", " - PORNSTARS.TUBE</title>")),
|
||||
"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</div>")
|
||||
return [
|
||||
(url, None)
|
||||
for url in text.extract_iter(album, ' href="', '"')
|
||||
]
|
||||
@@ -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",
|
||||
|
||||
58
test/results/pornstarstube.py
Normal file
58
test/results/pornstarstube.py
Normal file
@@ -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,
|
||||
},
|
||||
|
||||
)
|
||||
Reference in New Issue
Block a user