Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'nasty': 0.07; 'skip:u 30': 0.07; 'urllib2': 0.07; 'http': 0.09; 'output,': 0.09; 'shutil': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '(sorry': 0.16; ':-)': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'normally': 0.19; 'help.': 0.21; 'input': 0.22; 'import': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'parse': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'login': 0.25; 'header:In-Reply-To:1': 0.27; 'appreciated.': 0.29; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'info.': 0.31; 'sep': 0.31; 'url:python': 0.33; 'info': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'in:': 0.36; 'url:listinfo': 0.36; 'url:org': 0.36; 'starting': 0.37; 'pm,': 0.38; 'little': 0.38; 'url:mail': 0.40; 'here:': 0.62; 'url:user': 0.65; 'to:addr:gmail.com': 0.65; 'protocol,': 0.84; 'joel': 0.91; 'url:latest': 0.91; 'login.': 0.93; 'url:sid': 0.93; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=a+mJM+uiXlywDNJpm/EOd1A1eAvNXfGBE7d/vfM/eEc=; b=VaBJ0Lf/OGcxxiGZGRlHMvbXFxKtzz4qArvICxD4/ZBedkxIvBUjMovxBOl6rdoj5X dkGOkiJj9O5mS9bYcb9drSlDIVO9wHoynNe/ACsTaVdeeryJ19SaAuRY4dbDSkhIm79N GOlIXBv/A25sftFGmdGePybvVoy1ZAkWR0e8MidzZzmSH5DS6ORCzzQ0vw6MdacuYQUE 1245Q3UGz/vSpJ4pjkm1CZ4HOutR8P2wCeICEkyB0V9pwYAgEzjneuu+wsYvcNMGKSdS XFdxTYB6tyuJFsM3Xcxu8xO4TpHdexAQnTiUj52QJAtBKmi6uBrfOHZZjfqSTLLHLSNG apyQ== MIME-Version: 1.0 X-Received: by 10.58.246.8 with SMTP id xs8mr24588336vec.9.1378142554662; Mon, 02 Sep 2013 10:22:34 -0700 (PDT) In-Reply-To: <1ad0741f-b1a7-4226-bda6-8a4f194243fb@googlegroups.com> References: <1ad0741f-b1a7-4226-bda6-8a4f194243fb@googlegroups.com> Date: Mon, 2 Sep 2013 13:22:34 -0400 Subject: Re: Cookie or not..? From: Joel Goldstick To: mrcoludk@gmail.com Content-Type: text/plain; charset=UTF-8 Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1378142558 news.xs4all.nl 15908 [2001:888:2000:d::a6]:44369 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:53511 On Mon, Sep 2, 2013 at 1:11 PM, 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