Mercurial > ec-dotfiles
changeset 371:38c7615caf9e
Reduced limit to 100.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Thu, 28 Jun 2012 09:09:37 +0700 |
parents | fc644e52df7c |
children | ad07799cf765 |
files | bin/moefetch |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/moefetch Thu Jun 28 09:08:27 2012 +0700 +++ b/bin/moefetch Thu Jun 28 09:09:37 2012 +0700 @@ -118,11 +118,12 @@ Generate_Link() { echo " Fetching XML file" - tempnum=1000 + pagelimit=100 + tempnum="${pagelimit}" iternum=1 > "${TEMP_PREFIX}-list" - while [ "${tempnum}" -ge 1000 ]; do - url="${SITE}/post/index.xml?tags=$(get_cleantags "${TAGS}")&offset=0&limit=1000&page=${iternum}" + while [ "${tempnum}" -ge "${pagelimit}" ]; do + url="${SITE}/post/index.xml?tags=$(get_cleantags "${TAGS}")&offset=0&limit=${pagelimit}&page=${iternum}" [ ${_use_login} -eq 1 ] && url="${url}&login=${LOGIN_USER}&password_hash=${LOGIN_PASS}" wget --no-check-certificate --quiet "${url}" -O "${TEMP_PREFIX}-xml" --referer="${SITE}/post" --user-agent="${useragent}" -e continue=off || Err_Fatal "Failed download catalog file" printf "Processing XML file... "