[chevereto] fix 'id' for links without file name (#8307)
e.g. https://jpg6.su/img/LecXGS/
This commit is contained in:
@@ -75,7 +75,7 @@ class CheveretoImageExtractor(CheveretoExtractor):
|
||||
fromhex=True)
|
||||
|
||||
file = {
|
||||
"id" : self.path.rpartition(".")[2],
|
||||
"id" : self.path.rpartition("/")[2].rpartition(".")[2],
|
||||
"url" : url,
|
||||
"album": text.remove_html(extr(
|
||||
"Added to <a", "</a>").rpartition(">")[2]),
|
||||
|
||||
@@ -24,6 +24,23 @@ __tests__ = (
|
||||
"user" : "exearco",
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpg6.su/img/LecXGS/",
|
||||
"#comment" : "image ID without name (#8307)",
|
||||
"#category": ("chevereto", "jpgfish", "image"),
|
||||
"#class" : chevereto.CheveretoImageExtractor,
|
||||
"#results" : "https://simp3.jpg5.su/images/funnymeme.jpg",
|
||||
"#sha1_content": "098e5e9b17ad634358426e0ffd1c93871474d13c",
|
||||
|
||||
"album" : "",
|
||||
"date" : "dt:2022-06-05 03:24:25",
|
||||
"extension": "jpg",
|
||||
"filename" : "funnymeme",
|
||||
"id" : "LecXGS",
|
||||
"url" : "https://simp3.jpg5.su/images/funnymeme.jpg",
|
||||
"user" : "exearco",
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://jpg.church/img/auCruA",
|
||||
"#category": ("chevereto", "jpgfish", "image"),
|
||||
|
||||
Reference in New Issue
Block a user