Created
May 16, 2019 21:33
-
-
Save snoj/0892d0ddbb4ddbe83723e34b16905e75 to your computer and use it in GitHub Desktop.
archiving tweets shell scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
turl="$1"; #`php -r "echo urlencode(\$argv[1]);" "$1"`; | |
enurl=`php -r "echo urlencode('$turl');"`; | |
#php -r "echo urlencode(\$argv[1]);" "$1" ; # $turl; | |
aurl="https://archive.is/?run=1&url=$enurl"; | |
subid=`curl -s "$aurl" | pup 'input[name=submitid] attr{value}'` | |
subidencoded=`php -r "echo urlencode('$subid');"`; | |
echo $enurl; | |
echo $aurl; | |
echo -F "submitid=$subidencoded" -F "url=$enurl"; | |
##curl -s "" | pup 'input[name=submitid] attt{value}'` | |
curl -H "Content-Type: application/x-www-form-urlencoded" -vv --referer "$aurl" --data "submitid=$subidencoded&url=$enurl" -s -XPOST "https://archive.is/submit/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
targetuser="shane_holmberg"; | |
curl -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" -s "https://twitter.com/search?f=tweets&vertical=default&q=from%3A$targetuser&src=typd" | pup "a[href*=$targetuser/status] attr{href}" 2>/dev/null | xargs -I {} archive.to.sh "https://twitter.com{}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment