fix missing an "r" prefix (#296)

Signed-off-by: Furry Chemistry <84753790+aryazakaria01@users.noreply.github.com>
This commit is contained in:
Furry Chemistry 2024-06-29 08:00:49 +07:00 committed by GitHub
parent 4dee501c8f
commit 5365a62103
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -198,7 +198,7 @@ async def instadl(_, message):
if post.status_code not in [200, 401]:
return await message.reply("Unknown error.")
res = post.json()
if r := re.findall('href="(https?://(?!play\.google\.com|/)[^"]+)"', res["data"]):
if r := re.findall(r'href="(https?://(?!play\.google\.com|/)[^"]+)"', res["data"]):
res = r[0].replace("&amp;", "&")
fname = (await fetch.head(res)).headers.get("content-disposition", "").split("filename=")[1]
is_img = (await fetch.head(res)).headers.get("content-type").startswith("image")