Skip to content

Commit

Permalink
allow file:// prefix for file proxy lists
Browse files Browse the repository at this point in the history
  • Loading branch information
monosans committed Jan 7, 2025
1 parent 07148d8 commit 63b706a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion proxy_scraper_checker/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 63b706a

Please sign in to comment.