- pup (https://github.com/ericchiang/pup)
- rename archive.to.sh to archive.to
Scripts provided assume that pup and archive.to.sh are in a PATH folder.
edit archive-twitter-user.sh for the twitter username watch -n 60 ./archive-twitter-user.sh
Scripts provided assume that pup and archive.to.sh are in a PATH folder.
edit archive-twitter-user.sh for the twitter username watch -n 60 ./archive-twitter-user.sh
#!/bin/bash | |
tuser="TWITTERUSERNAME"; | |
searchurl="https://twitter.com/search?f=tweets&vertical=default&q=from%3A$tuser&src=typd" | |
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 "$searchurl" | pup "a[href*=$tuser/status] attr{href}" 2>/dev/null | xargs -I {} archive.to "https://twitter.com{}" |
#!/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/" |