From 7f374d5332d7fbd8f85a3c5b954806334d29cde7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Ostroluck=C3=BD?= Date: Sat, 5 Jan 2019 14:20:21 +0100 Subject: [PATCH] Adapt to Reddit json API structure change (closes #3) --- rdit.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rdit.sh b/rdit.sh index a688b3f..2eb9bc8 100644 --- a/rdit.sh +++ b/rdit.sh @@ -5,7 +5,7 @@ output="down" useragent="Love by u/gadelat" subreddit=$1 -url="https://www.reddit.com/r/$subreddit/.json" +url="https://www.reddit.com/r/$subreddit/.json?raw_json=1" content=`wget -U "$useragent" -q -O - $url` mkdir -p $output while : ; do @@ -27,7 +27,7 @@ while : ; do if [ -z $after ]; then break fi - url="https://www.reddit.com/r/$subreddit/.json?count=200&after=$after" + url="https://www.reddit.com/r/$subreddit/.json?count=200&after=$after&raw_json=1" content=`wget -U "$useragent" --no-check-certificate -q -O - $url` #echo -e "$urls" done