Answer the question
In order to leave comments, you need to log in
Parsing. I'm getting an error, what's the problem?
import requests
def get_data(url):
headers = {
"Accept": "application / json, text / javascript, * / *; q = 0.01",
"Accept-Encoding": "gzip, deflate, br",
"Connection": "keep-alive",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36",
"X-Requested-With": "XMLHttpRequest"
}
r = requests.get(url=url, headers=headers)
with open("index.html", "w") as file:
file.write(r.text)
def main():
get_data("https://pr.zk.court.gov.ua/new.php")
if __name__ == "__main__":
main()
Answer the question
In order to leave comments, you need to log in
pops up error code: lmlkhg
error code: hgjfv7
, so the problem is in the site. not in code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question