Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Test for presence of $@.json file; continue if present
- if [ -f ./$@.json ]; then
- twint --json --profile-full --resume $(cat $@.json|tail -n1|tr '\" ' '\n'|sed -e '4!d' -e 's/,//') -u $@ -o $@.json.tmp && tac @.json.tmp >>$@.json
- else
- twint --json --profile-full -u $@ -o $@.json.tmp && tac $@.json.tmp >$@.json && mkdir video && mkdir images
- fi
- # Download all images
- cat $@.json|tr '\" ' '\n'|grep -o -w https://pbs.twimg.com/media/*.*g -|sed -e "s/$/\:orig/g"|wget -nc -i - -P ./images/
- # Download all video media
- cat $@.json|grep "\"video\"\: 1"|tr '\" ' '\n'|grep $@/status|youtube-dl -o ./"video/%(id)s.%(ext)s" -i -a -
- # Delete temporary file
- rm $@.json.tmp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement