Closed hl2guide closed 5 months ago
I don't see any logs indicating blocked requests. Could you please provide the RayID?
I have just found it now:
Ray ID: 88b3b16c0882aadd
User agent: Python-urllib/3.12
Browser integrity check
Try changing the user agent.
Thanks, got it working with:
import requests
url = "https://blocklist.sefinek.net/generated/v1/adguard/abuse/blocklistproject/hosts.fork.txt"
headers = {
'User-Agent': 'Mozilla 5.0',
}
response = requests.get(url, headers=headers)
content = response.text
if response.status_code == 200:
with open("output.txt", "w") as file:
file.write(content)
Great, no problem <:
Anyway, I recommend using user agents like these:
NAME/VERSION (+HOMEPAGE)
or
Mozilla/5.0 (compatible; NAME/VERSION; +HOMEPAGE)
e.g.: