aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV.Krishn <vkrishn@insteps.net>2022-12-05 02:15:29 +0530
committerV.Krishn <vkrishn@insteps.net>2022-12-05 02:15:29 +0530
commit28f82512aec4368c0c347d526953f5d5319cc6bb (patch)
tree4e462eb70d22e58fe81ea74076ea46668930dec9
parent978fb82f149f8ff61471fac7d13e0f0129b3ffe4 (diff)
downloadnbreader-28f82512aec4368c0c347d526953f5d5319cc6bb.tar.bz2
add processing of feed type <feed xmlns... atom
-rw-r--r--scripts/fetch.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/fetch.sh b/scripts/fetch.sh
index 767898d..3218862 100644
--- a/scripts/fetch.sh
+++ b/scripts/fetch.sh
@@ -69,7 +69,9 @@ is_xml() {
if [ ! -f "$1" ]; then return 1; fi
# dependencies=file, need another option if possible
- if [ -n "$(grep '^<rss version' $1)" ]; then return 0; fi
+ isAtom=$(grep '^<feed xmlns' $1 | grep -i 'atom')
+ isRss=$(grep '^<rss version' $1)
+ if [ -n "$isRss" -o -n "$isAtom" ]; then return 0; fi
# get mime/encoding
local mime=$(file --mime-type --mime-encoding $1)