[Python-mx] Ayuda esto tratando de hacer esto con request pero me manda error
Héctor de la Rosa Mondragón
hrosa at cesvimexico.com.mx
Wed Nov 9 14:57:37 EST 2016
Buenas tardes
Me podrán ayudar si sabrán cual es el error por lo cual no ejecuta este
acceso estoy utilizando requests
import requests
with requests.Session() as s:
mobylity_url =
"http://200.77.225.7/mbs_admin_net/(S(obcsvcf4blbxherbbctdew2d))/Login.aspx/
?Sign_In=Accesar"
USERTYPE = 'Consola'
USERNAME = 'MPFR_GECOLIN'
PASSWORD = 'ge12873*5'
s.get(mobylity_url)
csrftoken = s.cookies['csrftoken']
login_data= dict(csrfmiddlewaretoken =csrftoken, UserType
=USERTYPE, UserName =USERNAME, Password =PASSWORD, Sign_In =Accesar)
s.post(mobylity_url, data=login_data, headers={"Referer":
"http://200.77.225.7/mbs_admin_net/(S(obcsvcf4blbxherbbctdew2d))/Login.aspx"
})
page =
s.get('http://200.77.225.7//mbs_admin_net/(S(obcsvcf4blbxherbbctdew2d))/Logi
n.aspx')
print page.content
Descripción: tp.jpg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-mx/attachments/20161109/3fd7f162/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 102563 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-mx/attachments/20161109/3fd7f162/attachment-0001.png>
More information about the Python-mx
mailing list