Answer the question
In order to leave comments, you need to log in
Site parsing. How to find a POST request on the site after clicking the "send" button?
I am writing a program in python to parse a website.
schroederindustries.info/CrossReference.aspx
I have an array of values that I need to enter one by one into the search box, press the search button and parse the result. The site uses POST requests that I can't catch.
I need a line generating a POST request in order to parse the desired results in a loop.
Please help me calculate this line.
If it does not work out, then you will have to parse through Selenium.
Answer the question
In order to leave comments, you need to log in
what to calculate there, POST is done to the same page
F12 > network > Preserve log
__EVENTTARGET:
__EVENTARGUMENT:
__LASTFOCUS:
__VIEWSTATE: ........
__VIEWSTATEGENERATOR: 0470EB9F
__EVENTVALIDATION: ..........
ctl00%24ContentPlaceHolder1%24OEMSearch: uuuuuuuuuuuuu
ctl00%24ContentPlaceHolder1%24OEMSearchbtn: Search
ctl00%24ContentPlaceHolder1%24OEMDistinct:
(() => {
const body = new FormData(document.forms.form1)
body.set('ctl00$ContentPlaceHolder1$OEMSearch', 'te')
fetch('./CrossReference.aspx', {
method: 'POST',
body,
}).then(r => r.text()).then(console.log)
})()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question