Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'algorithm': 0.04; 'subject:Python': 0.06; '(b)': 0.07; "subject:' ": 0.07; 'subject:Error': 0.07; 'subject:trying': 0.09; 'subject:using': 0.09; 'cc:addr:python-list': 0.11; 'jan': 0.12; 'dig': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:login': 0.16; 'subject:when': 0.16; 'telnet,': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; '(a)': 0.24; 'headers': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'that.': 0.31; 'another': 0.32; 'maybe': 0.34; 'could': 0.34; 'something': 0.35; 'received:google.com': 0.35; 'sometimes': 0.38; 'server': 0.38; 'pm,': 0.38; 'does': 0.39; '12,': 0.39; 'different': 0.65; 'bare': 0.84; "it'd": 0.84; 'pain': 0.84; 'ps.': 0.84; 'secret,': 0.84; 'subject:skip:H 10': 0.84; 'url:loginpage': 0.84; 'to:none': 0.92 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:cc :content-type; bh=OZmdwgr5WIp9PVsHvqXmWpnO+n5LirXO50r8QzkvKAo=; b=gDUpFEkX4ziV+xEoK0wiYddqHF7Mv2sA3Du2YnqsRI0UMFUc3p8kpbVf5zNmEHdc8f ON9Wwl9jXwQTDyhTdgUni/C1IkgjK69Fm3yqrdfUfKfW3HYNrxrDOM9a/M+Hk1acjimd GvUNnuoSbY1SmG2WslKCZRcEuCC4Qu57wKmpUm5KG0CDo6gfymIiZFapj6dkaOJokd6S czlr7h4clERuWxnMBtSQ6M8lEBb6wK9nXrCAWAcjOWVMGdpXHmLcbZtjQQgTdBRNDYDR sKF2oJm40r+TUoUNpwFPStZBIumAGfeq+my3t/C4mLmnLNlpKLqPgE3iL3ThC02Y/P3Z HPUA== MIME-Version: 1.0 X-Received: by 10.68.183.164 with SMTP id en4mr252402pbc.169.1389530678452; Sun, 12 Jan 2014 04:44:38 -0800 (PST) In-Reply-To: <9e7e031f-b6db-43fc-84d2-ef68916ec756@googlegroups.com> References: <9e7e031f-b6db-43fc-84d2-ef68916ec756@googlegroups.com> Date: Sun, 12 Jan 2014 23:44:38 +1100 Subject: Re: Python: 404 Error when trying to login a webpage by using 'urllib' and 'HTTPCookieProcessor' From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389530687 news.xs4all.nl 2874 [2001:888:2000:d::a6]:52973 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63767 On Sun, Jan 12, 2014 at 11:17 PM, KMeans Algorithm wrote: > The page "https://www.mysite.com/loginpage" does exist PS. If it's not an intranet site and the URL isn't secret, it'd help if we could actually try things out. One of the tricks I like to use is to access the same page with a different program/library - maybe wget, or bare telnet, or something like that. Sometimes one succeeds and another doesn't, and then you dig into the difference (once I found that a web server failed unless the request headers were in a particular order - that was a pain to (a) find, and (b) work around!). ChrisA