Advertisement
Guest User

twitscrape, put this in /usr/bin or something

a guest
Apr 16th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # Test for presence of [email protected] file; continue if present
  4. if [ -f ./[email protected] ]; then
  5. twint --json --profile-full --resume $(cat [email protected]|tail -n1|tr '\" ' '\n'|sed -e '4!d' -e 's/,//') -u $@ -o [email protected] && tac @.json.tmp >>[email protected]
  6. else
  7. twint --json --profile-full -u $@ -o [email protected] && tac [email protected] >[email protected] && mkdir video && mkdir images
  8. fi
  9.  
  10. # Download all images
  11. cat [email protected]|tr '\" ' '\n'|grep -o -w https://pbs.twimg.com/media/*.*g -|sed -e "s/$/\:orig/g"|wget -nc -i - -P ./images/
  12.  
  13. # Download all video media
  14. cat [email protected]|grep "\"video\"\: 1"|tr '\" ' '\n'|grep $@/status|youtube-dl -o ./"video/%(id)s.%(ext)s" -i -a -
  15.  
  16. # Delete temporary file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement