# HG changeset patch # User Edho Arief # Date 1340849377 -25200 # Node ID 38c7615caf9e4a5d8224c817aebd4d98cbe7d637 # Parent fc644e52df7c0a8eccd0b866c0dd69f0cf80bbc9 Reduced limit to 100. diff -r fc644e52df7c -r 38c7615caf9e bin/moefetch --- 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... "