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.
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:31 | admin | set | github: 59295 |
| 2012年06月24日 19:31:52 | eric.araujo | set | nosy:
+ 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:27 | jcea | set | nosy:
+ jcea |
| 2012年06月17日 10:31:25 | pitrou | set | nosy:
+ orsenthil, pitrou messages: + msg163052 versions: + Python 3.3, - Python 3.4 |
| 2012年06月17日 08:16:18 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka |
| 2012年06月17日 07:02:36 | rhettinger | create | |