aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV.Krishn <vkrishn4@gmail.com>2020-02-01 17:20:42 +0530
committerV.Krishn <vkrishn4@gmail.com>2020-02-01 17:20:42 +0530
commit9df853b08cffe3729ce39bb4ff41c830803a4c0b (patch)
treee3ae447451431742c2a670d8afd3940ff9e0309e
parent1ce859ef002dcacd7781edeafaf3cfcf0e7c90bc (diff)
downloadnbreader-9df853b08cffe3729ce39bb4ff41c830803a4c0b.tar.bz2
minor fix in feedicon url proto
-rw-r--r--scripts/feedicon.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/feedicon.sh b/scripts/feedicon.sh
index 2c367a1..de3b2a5 100644
--- a/scripts/feedicon.sh
+++ b/scripts/feedicon.sh
@@ -71,7 +71,7 @@ parse_feed_icon_url() {
ICONURL=$(cat "$localHtml" | grep -i "rel\=[\"\']icon" )
fi
ICONURL=$(echo "$ICONURL" |
- grep -i -o "href\=[\"\']\(.*\)[\"\']" |
+ grep -i -o "href\=\(.*\)" | tr -d '"' | tr -d "'" | \
sed -e "s/href//" \
-e "s/\"//g" \
-e "s/'//g" \
@@ -79,7 +79,9 @@ parse_feed_icon_url() {
-e "s/>.*$//g"
)
ICONURL=$( echo "$ICONURL" | awk '{print $1}' )
- # echo $ICONURL;
+ local no_proto=$(echo $ICONURL | grep -i '^\/\/')
+ if [ "$no_proto" ]; then ICONURL='https:'${ICONURL}; fi # add protocol https
+ # echo -e ${cYELLOW}'msg: base site icon url -> '${cNORMAL}${ICONURL} '...';
}
# get baseurl site to look for 'shortcut icon' in <link ... />