[wallpapercave] add extractor for images (#2205)
This commit is contained in:
committed by
GitHub
parent
c661737f36
commit
b17e2dcf93
@@ -787,6 +787,12 @@ Consider all sites to be NSFW unless otherwise known.
|
|||||||
<td>Collections, individual Images, Search Results</td>
|
<td>Collections, individual Images, Search Results</td>
|
||||||
<td><a href="configuration.rst#extractorwallhavenapi-key">API Key</a></td>
|
<td><a href="configuration.rst#extractorwallhavenapi-key">API Key</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Wallpaper Cave</td>
|
||||||
|
<td>https://wallpapercave.com/</td>
|
||||||
|
<td>individual Images, Search Results</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Warosu</td>
|
<td>Warosu</td>
|
||||||
<td>https://warosu.org/</td>
|
<td>https://warosu.org/</td>
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ modules = [
|
|||||||
"vk",
|
"vk",
|
||||||
"vsco",
|
"vsco",
|
||||||
"wallhaven",
|
"wallhaven",
|
||||||
|
"wallpapercave",
|
||||||
"warosu",
|
"warosu",
|
||||||
"weasyl",
|
"weasyl",
|
||||||
"webtoons",
|
"webtoons",
|
||||||
|
|||||||
30
gallery_dl/extractor/wallpapercave.py
Normal file
30
gallery_dl/extractor/wallpapercave.py
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Copyright 2021 David Hoppenbrouwers
|
||||||
|
#
|
||||||
|
# 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://wallpapercave.com/"""
|
||||||
|
|
||||||
|
from .common import Extractor, Message
|
||||||
|
from .. import text
|
||||||
|
|
||||||
|
|
||||||
|
class WallpapercaveImageExtractor(Extractor):
|
||||||
|
"""Extractor for images on wallpapercave.com"""
|
||||||
|
category = "wallpapercave"
|
||||||
|
subcategory = "image"
|
||||||
|
root = "https://wallpapercave.com"
|
||||||
|
pattern = r"(?:https?://)?(?:www\.)?wallpapercave\.com"
|
||||||
|
test = ("https://wallpapercave.com/w/wp10270355", {
|
||||||
|
"content": "58b088aaa1cf1a60e347015019eb0c5a22b263a6",
|
||||||
|
})
|
||||||
|
|
||||||
|
def items(self):
|
||||||
|
page = self.request(text.ensure_http_scheme(self.url)).text
|
||||||
|
for path in text.extract_iter(page, 'class="download" href="', '"'):
|
||||||
|
image = text.nameext_from_url(path)
|
||||||
|
yield Message.Directory, image
|
||||||
|
yield Message.Url, self.root + path, image
|
||||||
@@ -111,6 +111,7 @@ CATEGORY_MAP = {
|
|||||||
"vk" : "VK",
|
"vk" : "VK",
|
||||||
"vsco" : "VSCO",
|
"vsco" : "VSCO",
|
||||||
"wakarimasen" : "Wakarimasen Archive",
|
"wakarimasen" : "Wakarimasen Archive",
|
||||||
|
"wallpapercave" : "Wallpaper Cave",
|
||||||
"webtoons" : "Webtoon",
|
"webtoons" : "Webtoon",
|
||||||
"wikiart" : "WikiArt.org",
|
"wikiart" : "WikiArt.org",
|
||||||
"xhamster" : "xHamster",
|
"xhamster" : "xHamster",
|
||||||
@@ -203,6 +204,9 @@ SUBCATEGORY_MAP = {
|
|||||||
"wallhaven": {
|
"wallhaven": {
|
||||||
"collections": "",
|
"collections": "",
|
||||||
},
|
},
|
||||||
|
"wallpapercave": {
|
||||||
|
"image": "individual Images, Search Results",
|
||||||
|
},
|
||||||
"weasyl": {
|
"weasyl": {
|
||||||
"journals" : "",
|
"journals" : "",
|
||||||
"submissions": "",
|
"submissions": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user