projects
/
winfreed.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
eff855e
)
winfreed.py: pretend to be wget
author
Antonio Ospite <ao2@ao2.it>
Thu, 5 Oct 2017 14:50:02 +0000
(16:50 +0200)
committer
Antonio Ospite <ao2@ao2.it>
Thu, 5 Oct 2017 14:50:02 +0000
(16:50 +0200)
This avoids annoying redirects with sourceforge and still works with
some web servers which require the User Agent to be set.
winfreed.py
patch
|
blob
|
history
diff --git
a/winfreed.py
b/winfreed.py
index
a2b95ab
..
d520b1e
100755
(executable)
--- a/
winfreed.py
+++ b/
winfreed.py
@@
-70,7
+70,7
@@
def show(pkg):
def download_file(src_url, dest_dir):
try:
hdr = {
- 'User-Agent': '
Mozilla/5.0 (Windows NT 6.1; rv:22.0) Gecko/20130405 Firefox/22.0
',
+ 'User-Agent': '
Wget/1.13.4 (linux-gnu)
',
}
request = urllib2.Request(src_url, headers=hdr)
response = urllib2.urlopen(request)