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!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.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:error': 0.03; 'error:': 0.07; 'advice.': 0.09; 'worked,': 0.09; 'chrome,': 0.16; 'expert,': 0.16; 'loop.': 0.16; 'recognise': 0.16; 'to:addr:pearwood.info': 0.16; "to:name:steven d'aprano": 0.16; 'wrote:': 0.18; 'sort': 0.25; '>': 0.26; 'gets': 0.27; 'header :In-Reply-To:1': 0.27; 'tried': 0.27; "doesn't": 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; "d'aprano": 0.31; 'fault': 0.31; 'sep': 0.31; 'steven': 0.31; 'writes:': 0.31; 'url:python': 0.33; 'could': 0.34; 'advice': 0.35; 'point.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'url:listinfo': 0.36; 'url:org': 0.36; 'server': 0.38; 'thank': 0.38; 'ends': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'to:2**2': 0.65; 'analysis': 0.75; 'end.': 0.84 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 :content-type; bh=kpu+oTUYcNzWW3yQBjkcno1mJKWO1/8UNyGt1ZAR6HM=; b=fq7BZuWumBVR0dJfiTZnAAFStGRhNFqjorCs8j8KxQFxYwKd3VFoAV4ON1hemTuCQo jRPObZ8H27nhPfxzbLFGzS4ATrczfgurA6TFBoekcktQuBdHT9vs8ZXJIYuZqzhgljQ6 vDByugIxIbt4e/LLYL+ESTcM8RtC+FGLQeb4rvFeuUZlWRxLqzjQAqpKhHSN87hypAl/ fNJgziGBW634bqm0+c1dC8hmY+zJq4LUTBTReoex6sP77WQWoG3d9iAIQhDfRPzhTwi/ ditSlG96x/0ruxwFd6dEZJO0rVcsJNpzD8p0EuwqjcSzLo+Cvjj6OOo/HyTVfvQsZ9kS cLVw== MIME-Version: 1.0 X-Received: by 10.43.63.15 with SMTP id xc15mr1970869icb.66.1410020666997; Sat, 06 Sep 2014 09:24:26 -0700 (PDT) In-Reply-To: <87ppfddxnr.fsf@handshake.de> References: <540571b8$0$29876$c3e8da3$5496439d@news.astraweb.com> <87ppfddxnr.fsf@handshake.de> Date: Sat, 6 Sep 2014 09:24:26 -0700 Subject: Re: urllib2 redirect error From: Sumit Ray To: dieter , "Steven D'Aprano" , python-list@python.org Content-Type: multipart/alternative; boundary=bcaec51d2a34fb8753050268047f X-Mailman-Approved-At: Sat, 06 Sep 2014 19:42:06 +0200 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: 62 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1410025327 news.xs4all.nl 2955 [2001:888:2000:d::a6]:57880 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77659 --bcaec51d2a34fb8753050268047f Content-Type: text/plain; charset=UTF-8 Steven, Thank you! User advice was on point. Sumit On Tue, Sep 2, 2014 at 11:29 PM, dieter wrote: > Steven D'Aprano writes: > > ... > > I'm not an expert, but that sounds like a fault at the server end. I just > > tried it in Chrome, and it worked, and then with wget, and I get the same > > sort of error: > > ... > > Sounds like if the server doesn't recognise the browser, it gets > > confused and ends up in a redirect loop. > > > > You could try setting the user-agent and see if that helps: > > Excellent analysis and advice. > > -- > https://mail.python.org/mailman/listinfo/python-list > --bcaec51d2a34fb8753050268047f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Steven,

Thank you! User advice was = on point.

Sumit


On Tue, Sep 2, 2014 at 11:29 PM, dieter <diete= r@handshake.de> wrote:
Stev= en D'Aprano <steve@pearwood.i= nfo> writes:
> ...
> I'm not an expert, but that sounds like a fault at the server end.= I just
> tried it in Chrome, and it worked, and then with wget, and I get the s= ame
> sort of error:
> ...
> Sounds like if the server doesn't recognise the browser, it gets > confused and ends up in a redirect loop.
>
> You could try setting the user-agent and see if that helps:

Excellent analysis and advice.

--
https://mail.python.org/mailman/listinfo/python-list

--bcaec51d2a34fb8753050268047f--