[okporn] add support (#8575)
* Add support for ok.porn
* update
- adjust pattern/example/page_url
- prevent unnecessary request
- extract 'tags'
- text.extract -> text.extr
- return list comprehension result
* update supportedsites name
* update test results
---------
Co-authored-by: Mike Fährmann <mike_faehrmann@web.de>
This commit is contained in:
@@ -727,6 +727,12 @@ Consider all listed sites to potentially be NSFW.
|
||||
<td>individual Images, Models</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr id="okporn" title="okporn">
|
||||
<td>OK.PORN</td>
|
||||
<td>https://ok.porn/</td>
|
||||
<td>Galleries</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr id="patreon" title="patreon">
|
||||
<td>Patreon</td>
|
||||
<td>https://www.patreon.com/</td>
|
||||
|
||||
@@ -142,6 +142,7 @@ modules = [
|
||||
"nozomi",
|
||||
"nsfwalbum",
|
||||
"nudostar",
|
||||
"okporn",
|
||||
"paheal",
|
||||
"patreon",
|
||||
"pexels",
|
||||
|
||||
39
gallery_dl/extractor/okporn.py
Normal file
39
gallery_dl/extractor/okporn.py
Normal file
@@ -0,0 +1,39 @@
|
||||
# -*- 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://ok.porn/"""
|
||||
|
||||
from .common import GalleryExtractor
|
||||
from .. import text
|
||||
|
||||
|
||||
class OkpornGalleryExtractor(GalleryExtractor):
|
||||
"""Extractor for image galleries from ok.porn"""
|
||||
category = "okporn"
|
||||
root = "https://ok.porn"
|
||||
pattern = r"(?:https?://)?(?:www\.)?ok\.porn/albums/(\d+)"
|
||||
example = "https://ok.porn/albums/12345/"
|
||||
|
||||
def __init__(self, match):
|
||||
url = f"{self.root}/albums/{match[1]}/"
|
||||
GalleryExtractor.__init__(self, match, url)
|
||||
|
||||
def metadata(self, page):
|
||||
return {
|
||||
"gallery_id" : text.parse_int(self.groups[0]),
|
||||
"title" : text.unescape(text.extr(
|
||||
page, "h1 class=title>", "</h1>")),
|
||||
"description": text.unescape(text.extr(
|
||||
page, 'name="description" content="', '"')),
|
||||
"tags": text.extr(
|
||||
page, 'name="keywords" content="', '"').split(", "),
|
||||
}
|
||||
|
||||
def images(self, page):
|
||||
return [
|
||||
(url, None)
|
||||
for url in text.extract_iter(page, 'data-original="', '"')
|
||||
]
|
||||
@@ -139,6 +139,7 @@ CATEGORY_MAP = {
|
||||
"nozrip" : "GaryC Booru",
|
||||
"nsfwalbum" : "NSFWalbum.com",
|
||||
"nudostar" : "NudoStar.TV",
|
||||
"okporn" : "OK.PORN",
|
||||
"paheal" : "Rule 34",
|
||||
"photovogue" : "PhotoVogue",
|
||||
"picstate" : "PicState",
|
||||
|
||||
47
test/results/okporn.py
Normal file
47
test/results/okporn.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# -*- 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 okporn
|
||||
|
||||
|
||||
__tests__ = (
|
||||
{
|
||||
"#url" : "https://ok.porn/albums/66141/",
|
||||
"#class" : okporn.OkpornGalleryExtractor,
|
||||
"#pattern" : r"https://pics\-storage\-1\.ok\.porn/contents/albums/main/1920x1080/66000/66141/\d+\.jpg",
|
||||
"#count" : 100,
|
||||
|
||||
"count" : 100,
|
||||
"num" : range(1, 100),
|
||||
"description": "When Tommy Wood catches his stepmom Slimthick Vic parading her juicy ass in a thong, he takes a few pictures to show his dad. Vic begs him not to tell him but Tommy says the only way he’ll delete the pictures is if she gives him some naughty TLC.",
|
||||
"extension" : "jpg",
|
||||
"filename" : r"re:^\d+$",
|
||||
"gallery_id" : 66141,
|
||||
"title" : "Stepmom Likes To Flaunt It",
|
||||
"tags" : [
|
||||
"milf",
|
||||
"big tits",
|
||||
"blowjob",
|
||||
"oral",
|
||||
"blonde",
|
||||
"doggystyle",
|
||||
"cowgirl",
|
||||
"big cock",
|
||||
"big ass",
|
||||
"missionary",
|
||||
"natural tits",
|
||||
"side fuck",
|
||||
"short hair",
|
||||
"long legs",
|
||||
"curvy",
|
||||
"straight hair",
|
||||
"perfect body",
|
||||
"bedroom",
|
||||
"Slimthick Vic",
|
||||
],
|
||||
},
|
||||
|
||||
)
|
||||
Reference in New Issue
Block a user