-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
22 lines (17 loc) · 737 Bytes
/
Copy pathtest.py
File metadata and controls
22 lines (17 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import requests
def main():
url = "https://mc.chargepoint.com/map-prod/v3/station/info?deviceId=1005954365"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Accept-Language": "en-US,en;q=0.5",
"Connection": "keep-alive",
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
print("Antwort von der URL:")
print(response.text)
else:
print("Fehler beim Abrufen der URL. Statuscode:", response.status_code)
if __name__ == "__main__":
main()