UPDATED:
So Im not sure why this question is not getting any love?
Am i not being clear as to what is needed? or is it not possible to do what i want with this page?
Some feed back would be great… even just pointing me in the correct method of doing it!
Hi, I have multiple cars at any one time and keeping track of the Regos on all the cars is a bit of a headache.
I have tried making a program that does this for me with me simply inputting the Rego, but I cannot get the results back.
import requests
from bs4 import BeautifulSoup
#url = 'https://httpbin.org/headers'
url = 'https://online.transport.wa.gov.au/webExternal/registration/?0-1.IBehaviorListener.1-layout-layout_body-' \
'registrationRequestForm-searchButton&random=0.1450971120800384'
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 '
'Safari/537.36 Edg/107.0.1418.62',
'Accept-Language': 'en-GB,en;q=0.9,en-US;q=0.8',
'Accept-Encoding': 'gzip, deflate, br',
'Referer': 'https://online.transport.wa.gov.au/webExternal/css/styles_licensing.css',
'Host': 'online.transport.wa.gov.au',
'Connection': 'keep-alive',
'Accept': 'image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8',
'DNT': '1',
'Cache-Control': 'no-cache',
'Pragma': 'no-cache',
'Cookie': 'JSESSIONID=70Pb5udz8enjqPcRk4OjOODjfORHr82eUe90pPSpitM83k2EWbRh!-1720409949!-1658794803; TS012ba7f5=0'
'1becb1e5b6b9eda0a43a7a09fe67c8e8d893f7792d1d8270a95b4267bb1b1754adc3fc326aa6104de47ae36b87d71d4c1afa8f1'
'73d2583279ddc291f0caef515f0f85c8ed',
}
value = {"plate": "1hdv242"}
r = requests.get(url, headers=headers, params=value)
#r = requests.post(url, headers=headers, params=value)
soup = BeautifulSoup(r.text, 'html.parser')
print(soup)
When I use the POST method, I can see the Rego in the html code of the site but I don’t get any results.
What am i doing wrong?