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 ="http://hostname")
>>> r.statuscode

But when I try:

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

Aucun commentaire:

Enregistrer un commentaire