mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 10:42:34 +01:00
[tapas] add 'creator' extractor (#5306)
This commit is contained in:
parent
35d4a706ae
commit
e02d2ff45d
@ -838,7 +838,7 @@ Consider all listed sites to potentially be NSFW.
|
||||
<tr>
|
||||
<td>Tapas</td>
|
||||
<td>https://tapas.io/</td>
|
||||
<td>Episodes, Series</td>
|
||||
<td>Creators, Episodes, Series</td>
|
||||
<td>Supported</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -151,3 +151,18 @@ class TapasEpisodeExtractor(TapasExtractor):
|
||||
|
||||
def episode_ids(self):
|
||||
return (self.episode_id,)
|
||||
|
||||
|
||||
class TapasCreatorExtractor(TapasExtractor):
|
||||
subcategory = "creator"
|
||||
pattern = BASE_PATTERN + r"/(?!series|episode)([^/?#]+)"
|
||||
example = "https://tapas.io/CREATOR"
|
||||
|
||||
def items(self):
|
||||
url = "{}/{}/series".format(self.root, self.groups[0])
|
||||
page = self.request(url).text
|
||||
page = text.extr(page, '<ul class="content-list-wrap', "</ul>")
|
||||
|
||||
data = {"_extractor": TapasSeriesExtractor}
|
||||
for path in text.extract_iter(page, ' href="', '"'):
|
||||
yield Message.Queue, self.root + path, data
|
||||
|
@ -73,4 +73,17 @@ __tests__ = (
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://tapas.io/SANG123/series",
|
||||
"#comment" : "#5306",
|
||||
"#category": ("", "tapas", "creator"),
|
||||
"#class" : tapas.TapasCreatorExtractor,
|
||||
"#urls" : (
|
||||
"https://tapas.io/series/the-return-of-the-disaster-class-hero-novel",
|
||||
"https://tapas.io/series/the-return-of-the-disaster-class-hero",
|
||||
"https://tapas.io/series/tomb-raider-king",
|
||||
"https://tapas.io/series/tomb-raider-king-novel",
|
||||
),
|
||||
},
|
||||
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user