homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Add etag support to urllib.request.urlopen
Type: enhancement Stage: needs patch
Components: Library (Lib) Versions: Python 3.4
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: eric.araujo, jcea, orsenthil, pitrou, rhettinger, serhiy.storchaka
Priority: normal Keywords:

Created on 2012年06月17日 07:02 by rhettinger, last changed 2022年04月11日 14:57 by admin.

Messages (2)
msg163021 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2012年06月17日 07:02
Add an optional argument to urlretrieve to specify an etag for previously downloaded content:
 >>> urlretrieve('example.com/data.txt', etag="105800d-4af6-4c29d893d69c0")
That optional argument would add the following to the outgoing headers:
 "If-None-Match: 105800d-4af6-4c29d893d69c0"
If the site returns a 304 Not Modified, then the full content download isn't needed.
msg163052 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012年06月17日 10:31
urlretrieve() is the old urllib interface. You probably want to improve the urllib2-inherited urlopen() instead.
History
Date User Action Args
2022年04月11日 14:57:31adminsetgithub: 59295
2012年06月24日 19:31:52eric.araujosetnosy: + eric.araujo
title: Add etag support to urllib.request.urlretrieve() -> Add etag support to urllib.request.urlopen

stage: needs patch
versions: + Python 3.4, - Python 3.3
2012年06月17日 14:31:27jceasetnosy: + jcea
2012年06月17日 10:31:25pitrousetnosy: + orsenthil, pitrou

messages: + msg163052
versions: + Python 3.3, - Python 3.4
2012年06月17日 08:16:18serhiy.storchakasetnosy: + serhiy.storchaka
2012年06月17日 07:02:36rhettingercreate

AltStyle によって変換されたページ (->オリジナル) /