C
C
cegthgtlhj2020-06-20 03:17:16
Parsing
cegthgtlhj, 2020-06-20 03:17:16

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
5eed5669af3ea516638864.jpeg

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

2 answer(s)
M
Michael, 2020-06-20
@cegthgtlhj

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)
})()

E
entermix, 2020-06-20
@entermix

Press F12

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question