1
0
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:
Mike Fährmann 2024-04-11 23:41:50 +02:00
parent 35d4a706ae
commit e02d2ff45d
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
3 changed files with 29 additions and 1 deletions

View File

@ -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>

View File

@ -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

View File

@ -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",
),
},
)