[Python-mx] Ayuda esto tratando de hacer esto con request pero me manda error

Noe Nieto nnieto at noenieto.com
Wed Nov 9 18:39:07 EST 2016


Hola. Pon el error, por favor.

-- Noe

2016-11-09 11:57 GMT-08:00 Héctor de la Rosa Mondragón <
hrosa at cesvimexico.com.mx>:

> 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))/Login.aspx')
>
>                 print page.content
>
>
>
> [image: Descripción: tp.jpg]
>
>
>
> _______________________________________________
> Python-mx mailing list
> Python-mx at python.org
> https://mail.python.org/mailman/listinfo/python-mx
>
>


-- 
---
Noe Nieto
NNieto Consulting Services
M: nnieto at noenieto.com
W: http://noenieto.com
T:  @tzicatl <https://twitter.com/#%21/tzicatl>
Li: Perfil en LinkedIn <http://www.linkedin.com/profile/view?id=84300665>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-mx/attachments/20161109/6ddf8330/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/6ddf8330/attachment-0001.png>


More information about the Python-mx mailing list