[axel-users] is it possible to set http header and user-agent in .axelrc file?
Ye Xu
ye.xu.hdm at gmail.com
Mon Dec 1 13:54:05 UTC 2008
Hello Everyone,
Just curious how can I set multiple http headers or user-agent inside
.axelrc file just like .wgetrc did like the following.
$less .wgetrc
header = Accept-Language: en-us,en;q=0.5
header = Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
header = Accept-Encoding: gzip,deflate
header = Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
header = Keep-Alive: 300
user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
referer = http://www.google.com
and I also tried to apply the same thing using an alias, but it won't work.
alias axel2='axel --user-agent="Mozilla/5.0 (Windows; U; Windows NT
5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"
--header="Accept:text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300"'
or
alias axel2='axel --user-agent="Mozilla/5.0 (Windows; U; Windows NT
5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"
--header="Accept:text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"
--header="Accept-Language: en-us,en;q=0.5" --header="Accept-Encoding:
gzip,deflate" --header="Accept-Charset:
ISO-8859-1,utf-8;q=0.7,*;q=0.7" --header="Keep-Alive: 300"'
the test link is the following.
http://f.youku.com/player/getFlvPath/sid/12281352837007018629_00/st/flv/fileid/020001070047CA21B541F9007D4392FE9E6FA5-6C90-5B04-1D92-C2FEB95942CB?K=68eeac87640cdc2f161a070f
with wget (with header, user-agent setting above) works, with axel
show a http 403 error.
thx
Ye
More information about the axel-users
mailing list