allow file:// prefix for file proxy lists

This commit is contained in:
monosans
2025-01-07 21:09:43 +03:00
parent 07148d8ccf
commit 63b706a2bb
+3 -1
View File
@@ -42,7 +42,9 @@ async def scrape_one(
content = await response.read()
text = get_response_text(response=response, content=content)
else:
content = await asyncio.to_thread(Path(source).read_bytes)
content = await asyncio.to_thread(
Path(source.removeprefix("file://")).read_bytes
)
text = bytes_decode(content)
except ClientResponseError as e:
_logger.warning(