structure change
This commit is contained in:
27
Not_used/part2.py
Normal file
27
Not_used/part2.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import requests
|
||||
|
||||
endpoints = [
|
||||
"https://ulse.wd5.myworkdayjobs.com/wday/cxs/ulse/ulsecareers/job/Evanston-IL/Data-Science---Engineering-Intern_JR1410-1",
|
||||
"https://ulse.wd5.myworkdayjobs.com/wday/cxs/ulse/ulsecareers/sidebar/Data-Science---Engineering-Intern_JR1410-1",
|
||||
]
|
||||
|
||||
headers = {
|
||||
"User-Agent": "Mozilla/5.0",
|
||||
"Accept": "application/json,text/plain,*/*",
|
||||
}
|
||||
|
||||
for url in endpoints:
|
||||
r = requests.get(url, headers=headers, timeout=30)
|
||||
print("\n===", url, "===")
|
||||
print("Status:", r.status_code)
|
||||
print("Content-Type:", r.headers.get("content-type"))
|
||||
# Try JSON
|
||||
try:
|
||||
data = r.json()
|
||||
print("JSON parsed ✅")
|
||||
if isinstance(data, dict):
|
||||
print("Top-level keys:", list(data.keys())[:40])
|
||||
else:
|
||||
print("Type:", type(data), "Len:", len(data))
|
||||
except Exception:
|
||||
print("Not JSON. Text preview:\n", r.text[:600])
|
||||
Reference in New Issue
Block a user