[imagepond] support '/i/' URLs, update root domain

This commit is contained in:
Mike Fährmann
2026-02-14 19:29:13 +01:00
parent 41998cbb8f
commit 01cb378baa
3 changed files with 11 additions and 4 deletions

View File

@@ -1365,7 +1365,7 @@ Consider all listed sites to potentially be NSFW.
</tr>
<tr id="imagepond" title="imagepond">
<td>ImagePond</td>
<td>https://imagepond.net/</td>
<td>https://www.imagepond.net/</td>
<td>Albums, Categories, Files, User Profiles</td>
<td></td>
</tr>

View File

@@ -88,7 +88,7 @@ BASE_PATTERN = CheveretoExtractor.update({
"pattern": r"(?:www\.)?jpe?g\d?\.(?:cr|su|pet|fish(?:ing)?|church)",
},
"imagepond": {
"root": "https://imagepond.net",
"root": "https://www.imagepond.net",
"pattern": r"(?:www\.)?imagepond\.net",
},
"imglike": {
@@ -101,7 +101,7 @@ BASE_PATTERN = CheveretoExtractor.update({
class CheveretoFileExtractor(CheveretoExtractor):
"""Extractor for chevereto files"""
subcategory = "file"
pattern = BASE_PATTERN + r"(/(?:im(?:g|age)|video)/[^/?#]+)"
pattern = BASE_PATTERN + r"(/(?:im(?:g|age)|video|i)/[^/?#]+)"
example = "https://jpg7.cr/img/TITLE.ID"
def items(self):
@@ -232,5 +232,6 @@ class CheveretoUserExtractor(CheveretoExtractor):
data_file = {"_extractor": CheveretoFileExtractor}
data_album = {"_extractor": CheveretoAlbumExtractor}
for url in self._pagination(self.root + self.path):
data = data_album if "/album/" in url else data_file
data = (data_album if "/album/" in url or "/a/" in url else
data_file)
yield Message.Queue, url, data

View File

@@ -55,6 +55,12 @@ __tests__ = (
"width" : 720,
},
{
"#url" : "https://www.imagepond.net/i/chv_317512",
"#category": ("chevereto", "imagepond", "file"),
"#class" : chevereto.CheveretoFileExtractor,
},
{
"#url" : "https://imagepond.net/album/CDilP/?sort=date_desc&page=1",
"#category": ("chevereto", "imagepond", "album"),