'.asp The data is not retrieved

I have a problem with my python that fetch HTML tag in the .asp file First, input the selection tag on the asp website and then change it to the next asp page.

http://www.indexpr.moc.go.th/PRICE_PRESENT/Select_month_regionCsi.asp?region=3

must input the month, year, and province.

enter image description here

After that shows the asp browser what I like to see, I want to scrap the HTML tag inside the browser. And I found the problem on this below.

post_request = requests.post('http://www.indexpr.moc.go.th/PRICE_PRESENT/table_month_regionCsi.asp', data=payload).content

soup = BeautifulSoup(post_request, 'html.parser')

payload = {

'DDMonth': 4,
'DDYear': 2565,
'DDProvince': 50,
'texttable': 'csi_price_north_web_avg',
'text_name': 'unit_code_N',

}

In tag tr, it is not retrieved the data.

Here is the expect output

enter image description here

enter image description here

So what I get

<tr bgcolor="#fefefe"> ...empty... </tr>

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source