# HG changeset patch # User Edho Arief # Date 1328753538 -25200 # Node ID b90ebadbfd5d991de347756d531a46a69c5602fe # Parent 36bc27bb32ffce15dfdd5034489c491bb8ff24a8 Forgot the other wget. diff -r 36bc27bb32ff -r b90ebadbfd5d bin/moefetch --- a/bin/moefetch Thu Feb 09 09:01:56 2012 +0700 +++ b/bin/moefetch Thu Feb 09 09:12:18 2012 +0700 @@ -34,6 +34,8 @@ # not user modifiable from here +useragent="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0) Gecko/20100101 Firefox/10.0" + # useless welcome message. Also version msg_welcome() { echo "moefetch ${_version} @@ -114,7 +116,6 @@ Fetching XML file" tempnum=1000 iternum=1 - useragent="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0) Gecko/20100101 Firefox/10.0" > "${TEMP_PREFIX}-list" while [ "${tempnum}" -ge 1000 ]; do url="http://${SITE}/post/index.xml?tags=$(get_cleantags "${TAGS}")&offset=0&limit=1000&page=${iternum}" @@ -304,7 +305,7 @@ else printf "Downloading files... " cd "${BASE_DIR}/${SITE_DIR}/${TARGET_DIR}" - wget -e continue=on -i "${TEMP_PREFIX}-newlist" -o "${TEMP_PREFIX}.log" + wget -e continue=on -i "${TEMP_PREFIX}-newlist" -o "${TEMP_PREFIX}.log" --referer="http://${SITE}/post" --user-agent="${useragent}" fi }