[bellazon] remove query parameters from attachment IDs (#8544)
This commit is contained in:
@@ -72,7 +72,8 @@ class BellazonExtractor(Extractor):
|
|||||||
dc["extension"] = ext
|
dc["extension"] = ext
|
||||||
elif "/core/interface/file/attachment.php" in url:
|
elif "/core/interface/file/attachment.php" in url:
|
||||||
if not dc["id"]:
|
if not dc["id"]:
|
||||||
dc["id"] = url.rpartition("?id=")[2]
|
dc["id"] = \
|
||||||
|
url.rpartition("?id=")[2].partition("&")[0]
|
||||||
if name := text.extr(info, ">", "<").strip():
|
if name := text.extr(info, ">", "<").strip():
|
||||||
text.nameext_from_url(name, dc)
|
text.nameext_from_url(name, dc)
|
||||||
|
|
||||||
|
|||||||
@@ -223,6 +223,20 @@ __tests__ = (
|
|||||||
"#count" : 0,
|
"#count" : 0,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://www.bellazon.com/main/topic/4322-candids/page/1852/#comment-5902385",
|
||||||
|
"#comment" : "attachment 'id' with query parameters (#8544)",
|
||||||
|
"#class" : bellazon.BellazonPostExtractor,
|
||||||
|
"#range" : "4",
|
||||||
|
"#results" : "https://www.bellazon.com/main/applications/core/interface/file/attachment.php?id=14418097&key=491d27ee2482b1808483f1d544873b06",
|
||||||
|
|
||||||
|
"count" : 4,
|
||||||
|
"num" : 4,
|
||||||
|
"filename" : "download",
|
||||||
|
"extension" : "jfif",
|
||||||
|
"id" : "14418097",
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://www.bellazon.com/main/topic/57872-millie-brady/",
|
"#url" : "https://www.bellazon.com/main/topic/57872-millie-brady/",
|
||||||
"#class" : bellazon.BellazonThreadExtractor,
|
"#class" : bellazon.BellazonThreadExtractor,
|
||||||
|
|||||||
Reference in New Issue
Block a user