For practicing purposes I'm trying to retrieve data from https://www.ruc.com.py/ by posting the number 1000000
At first it retrieved a "no access" message so I added headers and that solved it. But now it just brings a blank result, I was expecting to get a the name that corresponds with the input 1000000
This is my code:
import requests
headers = {
'referer': 'https://www.ruc.com.py/',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.60 Safari/537.36',
'x-requested-with': 'XMLHttpRequest'
}
num=str(1000000)
url = 'https://www.ruc.com.py/index.php/inicio/consulta_ruc'
response = requests.post(url , headers=headers, data=num)
print (response.text)
