Created
August 24, 2016 21:52
-
-
Save palcu/a01b664363fa91146ceaf4292ecbfbd9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [25]: session = requests.Session() | |
In [27]: data = {'username':'palcuiealex', 'password':"bla"} | |
In [28]: url | |
Out[28]: 'https://infoarena.ro/login' | |
In [29]: session.post(url, data=data) | |
Out[29]: <Response [200]> | |
In [30]: session.cookies | |
Out[30]: <RequestsCookieJar[Cookie(version=0, name='__cfduid', value='d83d1879d0e74648f5f40b768b49645561472075137', port=None, port_specified=False, domain='.infoarena.ro', domain_specified=True, domain_initial_dot=True, path='/', path_specified=True, secure=False, expires=1503611137, discard=False, comment=None, comment_url=None, rest={'HttpOnly': None}, rfc2109=False), Cookie(version=0, name='infoarena2_session', value='2k9s4529debpndu04k358i5l47', port=None, port_specified=False, domain='.infoarena.ro', domain_specified=True, domain_initial_dot=True, path='/', path_specified=True, secure=False, expires=None, discard=True, comment=None, comment_url=None, rest={}, rfc2109=False)]> | |
In [31]: resp = session.get('http://www.infoarena.ro/account') | |
In [32]: 'Contul meu' in resp.content | |
Out[32]: True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment