Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #53506 > unrolled thread
| Started by | mrcoludk@gmail.com |
|---|---|
| First post | 2013-09-02 10:11 -0700 |
| Last post | 2013-09-03 08:02 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.python
Cookie or not..? mrcoludk@gmail.com - 2013-09-02 10:11 -0700
Re: Cookie or not..? Joel Goldstick <joel.goldstick@gmail.com> - 2013-09-02 13:22 -0400
Re: Cookie or not..? dieter <dieter@handshake.de> - 2013-09-03 08:02 +0200
| From | mrcoludk@gmail.com |
|---|---|
| Date | 2013-09-02 10:11 -0700 |
| Subject | Cookie or not..? |
| Message-ID | <1ad0741f-b1a7-4226-bda6-8a4f194243fb@googlegroups.com> |
Hello Group.
I am a Python noob, and need some help. I am trying to log in to website using python and parse info after login.
In a browser, this link will log me in and keep me loged in:
http://[domain].com/loginh.aspx?SID=[xxx]&USER=[xxx]&PW=[xxx]
(sorry for the tripple x, but it is actually not something nasty :-) )
I normally do this
import os
import shutil
import utils
import urllib2
lobj = urllib2.urlopen('[URL-sorce]')
print lobj.read()
... and then parse output, but i need to login to get all info.
Any input will be appreciated.
[toc] | [next] | [standalone]
| From | Joel Goldstick <joel.goldstick@gmail.com> |
|---|---|
| Date | 2013-09-02 13:22 -0400 |
| Message-ID | <mailman.505.1378142558.19984.python-list@python.org> |
| In reply to | #53506 |
On Mon, Sep 2, 2013 at 1:11 PM, <mrcoludk@gmail.com> wrote:
> Hello Group.
>
> I am a Python noob, and need some help. I am trying to log in to website using python and parse info after login.
>
> In a browser, this link will log me in and keep me loged in:
> http://[domain].com/loginh.aspx?SID=[xxx]&USER=[xxx]&PW=[xxx]
>
> (sorry for the tripple x, but it is actually not something nasty :-) )
>
>
> I normally do this
>
>
> import os
> import shutil
> import utils
> import urllib2
>
> lobj = urllib2.urlopen('[URL-sorce]')
> print lobj.read()
>
>
> ... and then parse output, but i need to login to get all info.
>
> Any input will be appreciated.
> --
> http://mail.python.org/mailman/listinfo/python-list
You will need to understand a little about http protocol, and cookies.
Try starting here: http://docs.python-requests.org/en/latest/
--
Joel Goldstick
http://joelgoldstick.com
[toc] | [prev] | [next] | [standalone]
| From | dieter <dieter@handshake.de> |
|---|---|
| Date | 2013-09-03 08:02 +0200 |
| Message-ID | <mailman.532.1378188138.19984.python-list@python.org> |
| In reply to | #53506 |
mrcoludk@gmail.com writes: > I am a Python noob, and need some help. I am trying to log in to website using python and parse info after login. > > In a browser, this link will log me in and keep me loged in: > http://[domain].com/loginh.aspx?SID=[xxx]&USER=[xxx]&PW=[xxx] > > (sorry for the tripple x, but it is actually not something nasty :-) ) Look at the "cookielib" (called "cookiejar" for Python 3) module in Python's library.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web