vendredi 25 décembre 2015

In python how do I access an ASP webpage using Requests

I have an ASP website that I'm trying to access thru Python Requests. I can get a 200 status code when access the root server directory, but when I try and access .ASP website I'm getting a 404 error. Ive tried POST as well, same result

When I access http://hostname/Scripts/Home.asp thru the webbrowser, it works fine

>>> import requests
>>> r = requests.post(url="http://hostname")
>>> r.statuscode
200
>>>

But when I try:

>>> import requests
>>> r = requests.post(url="http://hostname/Scripts/Home.asp")
>>> r.status_code
404
>>>

Aucun commentaire:

Enregistrer un commentaire