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

J Luis Rodriguez rodriguezjluis0 at gmail.com
Thu Nov 10 01:18:42 EST 2016


Pero la próxima vez no dejes tus credenciales expuestas...

2016-11-09 17:39 GMT-06:00 Noe Nieto <nnieto at noenieto.com>:

> 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(obcsvcf4blbxherbbctdew
>> 2d))/Login.aspx"})
>>
>>                 page = s.get('http://200.77.225.7//mb
>> s_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>
>
> _______________________________________________
> Python-mx mailing list
> Python-mx at python.org
> https://mail.python.org/mailman/listinfo/python-mx
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-mx/attachments/20161110/806c6898/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/20161110/806c6898/attachment-0001.png>


More information about the Python-mx mailing list