[bunkr] fix ValueError on relative redirects (#6790)
This commit is contained in:
@@ -80,6 +80,9 @@ class BunkrAlbumExtractor(LolisafeAlbumExtractor):
|
|||||||
|
|
||||||
# redirect
|
# redirect
|
||||||
url = response.headers["Location"]
|
url = response.headers["Location"]
|
||||||
|
if url[0] == "/":
|
||||||
|
url = text.root_from_url(response.url) + url
|
||||||
|
continue
|
||||||
root, path = self._split(url)
|
root, path = self._split(url)
|
||||||
if root not in CF_DOMAINS:
|
if root not in CF_DOMAINS:
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -208,4 +208,12 @@ __tests__ = (
|
|||||||
"name" : "file",
|
"name" : "file",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://bunkr.ph/v/rEeTUL8MXR17A",
|
||||||
|
"#comment" : "redirect to '/f/rEeTUL8MXR17A' (#6790)",
|
||||||
|
"#category": ("lolisafe", "bunkr", "media"),
|
||||||
|
"#class" : bunkr.BunkrMediaExtractor,
|
||||||
|
"#urls" : "https://meatballs.bunkr.ru/27-03-2024-Rp-0FfrropA.mp4",
|
||||||
|
},
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user