Adapt to Reddit json API structure change (closes #3)
This commit is contained in:
parent
2261cef1fe
commit
7f374d5332
4
rdit.sh
4
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
|
||||
|
|
Loading…
Reference in New Issue