diff options
author | V.Krishn <vkrishn4@gmail.com> | 2020-04-27 13:15:55 +0530 |
---|---|---|
committer | V.Krishn <vkrishn4@gmail.com> | 2020-04-27 13:15:55 +0530 |
commit | e06ff05e153619302565b18913ea414cab3675e7 (patch) | |
tree | bb6d0460a6379f47340be8a6797e8bc897b5fa5f | |
parent | 5fd020bd5e0a06c8cce6291a3bb84b10d6537114 (diff) | |
download | nbreader-e06ff05e153619302565b18913ea414cab3675e7.tar.bz2 |
update useragent and quote error fix
-rw-r--r-- | scripts/env.sh | 3 | ||||
-rw-r--r-- | scripts/feedicon.sh | 4 | ||||
-rw-r--r-- | scripts/fetch.sh | 3 |
3 files changed, 5 insertions, 5 deletions
diff --git a/scripts/env.sh b/scripts/env.sh index 92b91c3..89f0d54 100644 --- a/scripts/env.sh +++ b/scripts/env.sh @@ -62,7 +62,8 @@ FEEDSURL="http://localhost/feeds" ARCHIVE="" # User agents -_USERAGENT_0="Mozilla/5.0 (X11; Linux i686 on x86_64; rv:21.0) Gecko/20100101 Firefox/21.0 Iceweasel/21.0" +# _USERAGENT_0="Mozilla/5.0 (X11; Linux i686 on x86_64; rv:21.0) Gecko/20100101 Firefox/21.0 Iceweasel/21.0" +_USERAGENT_0='Mozilla/5.0 (X11; Linux i686 on x86_64; rv:68.0) Gecko/20100101 Firefox/68.0' # newsbeuter <default configs> # wget diff --git a/scripts/feedicon.sh b/scripts/feedicon.sh index 3374343..a7abe46 100644 --- a/scripts/feedicon.sh +++ b/scripts/feedicon.sh @@ -123,7 +123,7 @@ check_icon_size() { local url=$1 if [ $USECURL = '1' ]; then - curl $CURLOPTS_1 --user-agent "'$_USERAGENT_0'" "$url" -s --dump-header "$localSHdr" > /dev/null 2>&1 + curl $CURLOPTS_1 --user-agent "$_USERAGENT_0" "$url" -s --dump-header "$localSHdr" > /dev/null 2>&1 lentxt='^Content-Length' else wget $WGETOPTS_1 --user-agent="'$_USERAGENT_0'" -S --spider "$url" -a "$localSHdr" @@ -145,7 +145,7 @@ fetch_feedicon() { echo -e ${cYELLOW}"msg: fetching icon ->${cNORMAL} $_fi ..."; if check_icon_size "$_fi"; then if [ $USECURL = '1' ]; then - curl $CURLOPTS_1 --user-agent "'$_USERAGENT_0'" "$_fi" -o "$localIco" -v --stderr - >> $logfile + curl $CURLOPTS_1 --user-agent "$_USERAGENT_0" "$_fi" -o "$localIco" -v --stderr - >> $logfile else wget $WGETOPTS_1 --user-agent="'$_USERAGENT_0'" "$_fi" -O "$localIco" -a $logfile fi diff --git a/scripts/fetch.sh b/scripts/fetch.sh index b8edd6b..012e9cb 100644 --- a/scripts/fetch.sh +++ b/scripts/fetch.sh @@ -113,8 +113,7 @@ fetch_url() { local logfile="$VARDIR/log/$DATESTAMP.log" if [ $USECURL = '1' ]; then - ##. curl $CURLOPTS_1 --user-agent "'$_USERAGENT_0'" "$URL" -o "$localXml" -v --stderr - >> "$logfile" - curl $CURLOPTS_1 --user-agent "'$_USERAGENT_0'" "$URL" -o "$localXml" -v --stderr - >> "$logfile" + curl $CURLOPTS_1 --user-agent "$_USERAGENT_0" "$URL" -o "$localXml" -v --stderr - >> "$logfile" else wget $WGETOPTS_1 --user-agent="'$_USERAGENT_0'" "$URL" -O "$localXml" -a $logfile fi |