Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #85747

Re: URL - Python ?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <emil@fuse.pl>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.093
X-Spam-Evidence '*H*': 0.81; '*S*': 0.00; 'subject:Python': 0.06; 'http': 0.09; 'url:github': 0.09; 'changes': 0.15; 'subject:URL': 0.16; 'url.': 0.16; 'subject: ?': 0.16; 'library': 0.18; 'header :User-Agent:1': 0.23; '&gt;&gt;&gt;': 0.24; 'header': 0.24; 'header:In-Reply-To:1': 0.27; 'point': 0.28; '(like': 0.30; 'url:wiki': 0.31; 'trace': 0.31; 'url:wikipedia': 0.31; 'image- size:2**11': 0.33; 'skip:> 10': 0.36; 'possible': 0.36; 'url:org': 0.36; 'server': 0.38; 'skip:[ 10': 0.38; 'to:addr:python-list': 0.38; 'track': 0.38; 'to:addr:python.org': 0.39; 'skip:u 10': 0.60; 'free': 0.61; 'new': 0.61; "you're": 0.61; "you'll": 0.62; 'received:194': 0.64; 'charset:windows-1252': 0.65; 'received:46': 0.66; 'virus:src="cid:': 0.66; 'content-type:multipart/related': 0.67; 'received:pl': 0.69
Date Tue, 17 Feb 2015 17:45:32 +0100
From Emil Oppeln-Bronikowski <emil@fuse.pl>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
MIME-Version 1.0
To python-list@python.org
Subject Re: URL - Python ?
References <0ee84d3b-0223-4c0b-a089-1722504ed7bc@googlegroups.com>
In-Reply-To <0ee84d3b-0223-4c0b-a089-1722504ed7bc@googlegroups.com>
Content-Type multipart/alternative; boundary="------------080209000403020306000008"
X-AntiAbuse This header was added to track abuse, please include it with any abuse report
X-AntiAbuse Primary Hostname - pol51.nameserverus2.com
X-AntiAbuse Original Domain - python.org
X-AntiAbuse Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse Sender Address Domain - fuse.pl
X-Get-Message-Sender-Via pol51.nameserverus2.com: authenticated_id: emil+fuse.pl/only user confirmed/virtual account not confirmed
X-Source
X-Source-Args
X-Source-Dir
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.18790.1424193116.18130.python-list@python.org> (permalink)
Lines 136
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1424193116 news.xs4all.nl 2923 [2001:888:2000:d::a6]:44728
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:85747

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

> I would want to know if it's possible to trace the url to the new location

If the webmaster did a proper thing you'll get server 3xx HTTP header 
that will point you to new URL.

http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection

If you're using a good library to do your HTTP (like requests) the 
URL-following is build in and free

>>>r  =  requests.get('http://github.com')
>>>r.url
'https://github.com/'
>>>r.status_code
200
>>>r.history
[<Response [301]>]

If you want to track changes just check if response.history has some items in it.

-- 

Emil Oppeln-Bronikowski *|* http://fuse.pl

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

URL - Python ? Josef Achkar <josef.achkar@gmail.com> - 2015-02-17 08:38 -0800
  Re: URL - Python ? Emil Oppeln-Bronikowski <emil@fuse.pl> - 2015-02-17 17:45 +0100

csiph-web