[eporner] add support (#8581)
* [eporner] Add support
* Line-length <80 chars
* Fix flake8 indentation
* update
- generalize example URL
- strip "Photo Gallery" from 'title'
- extract 'id'
* update supportedsites
* update test results
This commit is contained in:
@@ -283,6 +283,12 @@ Consider all listed sites to potentially be NSFW.
|
|||||||
<td>Favorites, Galleries, Posts, Search Results, Tag Searches</td>
|
<td>Favorites, Galleries, Posts, Search Results, Tag Searches</td>
|
||||||
<td>Supported</td>
|
<td>Supported</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr id="eporner" title="eporner">
|
||||||
|
<td>EPORNER</td>
|
||||||
|
<td>https://www.eporner.com/</td>
|
||||||
|
<td>Galleries</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr id="erome" title="erome">
|
<tr id="erome" title="erome">
|
||||||
<td>EroMe</td>
|
<td>EroMe</td>
|
||||||
<td>https://www.erome.com/</td>
|
<td>https://www.erome.com/</td>
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ modules = [
|
|||||||
"discord",
|
"discord",
|
||||||
"dynastyscans",
|
"dynastyscans",
|
||||||
"e621",
|
"e621",
|
||||||
|
"eporner",
|
||||||
"erome",
|
"erome",
|
||||||
"everia",
|
"everia",
|
||||||
"exhentai",
|
"exhentai",
|
||||||
|
|||||||
54
gallery_dl/extractor/eporner.py
Normal file
54
gallery_dl/extractor/eporner.py
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# -*- 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://www.eporner.com/"""
|
||||||
|
|
||||||
|
from .common import GalleryExtractor
|
||||||
|
from .. import text
|
||||||
|
|
||||||
|
|
||||||
|
class EpornerGalleryExtractor(GalleryExtractor):
|
||||||
|
"""Extractor for image galleries from eporner.com"""
|
||||||
|
category = "eporner"
|
||||||
|
root = "https://eporner.com"
|
||||||
|
pattern = (r"(?:https?://)?(?:www\.)?eporner\.com"
|
||||||
|
r"/gallery/(\w+)(?:/([\w-]+))?")
|
||||||
|
example = "https://www.eporner.com/gallery/GID/SLUG/"
|
||||||
|
|
||||||
|
def __init__(self, match):
|
||||||
|
url = f"{self.root}/gallery/{match[1]}/{match[2]}/"
|
||||||
|
GalleryExtractor.__init__(self, match, url)
|
||||||
|
|
||||||
|
def metadata(self, page):
|
||||||
|
title = text.extr(page, "<title>", " - EPORNER</title>")
|
||||||
|
if title.endswith(" Photo Gallery"):
|
||||||
|
title = title[:-14]
|
||||||
|
|
||||||
|
return {
|
||||||
|
"gallery_id": self.groups[0],
|
||||||
|
"title" : text.unescape(title),
|
||||||
|
"slug" : text.extr(
|
||||||
|
page, "/gallery/", '/"').rpartition("/")[2],
|
||||||
|
"description": text.unescape(text.extr(
|
||||||
|
page, 'name="description" content="', '"')),
|
||||||
|
"tags": text.extr(
|
||||||
|
page, 'EP.ads.keywords = "', '"').split(","),
|
||||||
|
}
|
||||||
|
|
||||||
|
def images(self, page):
|
||||||
|
album = text.extr(
|
||||||
|
page, 'class="photosgrid gallerygrid"', "id='gallerySlideBox'")
|
||||||
|
|
||||||
|
results = []
|
||||||
|
for url in text.extract_iter(album, ' src="', '"'):
|
||||||
|
url, _, ext = url.rpartition(".")
|
||||||
|
# Preview images have a resolution suffix.
|
||||||
|
# E.g. "11208293-image-3_296x1000.jpg".
|
||||||
|
# The same name, but without the suffix, leads to the full image.
|
||||||
|
url = url[:url.rfind("_")]
|
||||||
|
name = url[url.rfind("/")+1:]
|
||||||
|
results.append((f"{url}.{ext}", {"id": name[:name.find("-")]}))
|
||||||
|
return results
|
||||||
@@ -53,6 +53,7 @@ CATEGORY_MAP = {
|
|||||||
"e926" : "e926",
|
"e926" : "e926",
|
||||||
"e6ai" : "e6AI",
|
"e6ai" : "e6AI",
|
||||||
"erome" : "EroMe",
|
"erome" : "EroMe",
|
||||||
|
"eporner" : "EPORNER",
|
||||||
"everia" : "EVERIA.CLUB",
|
"everia" : "EVERIA.CLUB",
|
||||||
"e-hentai" : "E-Hentai",
|
"e-hentai" : "E-Hentai",
|
||||||
"exhentai" : "ExHentai",
|
"exhentai" : "ExHentai",
|
||||||
|
|||||||
44
test/results/eporner.py
Normal file
44
test/results/eporner.py
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
# -*- 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 eporner
|
||||||
|
|
||||||
|
|
||||||
|
__tests__ = (
|
||||||
|
{
|
||||||
|
"#url" : "https://www.eporner.com/gallery/mHNhErACQFE/NaughtyAmerica-Lolly-Dames-My-Wife-s-Hot-Friend-Big-Booty-Big-Tits-Lolly-Dames-Gets-Her-Pussy-Slammed-Hard/",
|
||||||
|
"#class" : eporner.EpornerGalleryExtractor,
|
||||||
|
"#pattern" : r"https://static\-eu\-cdn\.eporner\.com/gallery/FE/CQ/mHNhErACQFE/\d+\-image\-\d+\.jpg",
|
||||||
|
"#count" : 261,
|
||||||
|
|
||||||
|
"count" : 261,
|
||||||
|
"num" : range(1, 261),
|
||||||
|
"description": "NaughtyAmerica Lolly Dames - My Wife's Hot Friend - Big Booty Big Tits Lolly Dames Gets Her Pussy Slammed Hard sexy gallery with 261 pics. Eporner is the largest hd porn source.",
|
||||||
|
"extension" : "jpg",
|
||||||
|
"filename" : r"re:^\d+\-image\-\d+$",
|
||||||
|
"gallery_id" : "mHNhErACQFE",
|
||||||
|
"id" : r"re:^\d+$",
|
||||||
|
"slug" : "NaughtyAmerica-Lolly-Dames-My-Wife-s-Hot-Friend-Big-Booty-Big-Tits-Lolly-Dames-Gets-Her-Pussy-Slammed-Hard",
|
||||||
|
"title" : "NaughtyAmerica Lolly Dames - My Wife's Hot Friend - Big Booty Big Tits Lolly Dames Gets Her Pussy Slammed Hard",
|
||||||
|
"tags" : [
|
||||||
|
"cumshot",
|
||||||
|
"hardcore",
|
||||||
|
"blowjob",
|
||||||
|
"mature",
|
||||||
|
"housewives",
|
||||||
|
"big tits",
|
||||||
|
"blonde",
|
||||||
|
"big ass",
|
||||||
|
"milf",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://www.eporner.com/gallery/mHNhErACQFE",
|
||||||
|
"#class" : eporner.EpornerGalleryExtractor,
|
||||||
|
},
|
||||||
|
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user