Last active
June 8, 2023 15:22
-
-
Save dewomser/fa6379f1af4f482caea4eceefe4ffe46 to your computer and use it in GitHub Desktop.
retweet japanese photos with cats. Does no longer work due this uses twitterapi
This file contains 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 | |
curl --request GET "https://api.twitter.com/2/tweets/search/recent?query=context%3A65.852262932607926273%20-context%3A66.852262932607926273%20-is%3Aretweet%20has%3Aimages%20lang%3Aja" -H "Authorization: Bearer $BEARER_TOKEN" | jq . | grep \"id\": | sed s/\"id\"://g | sed s/" "//g | sed s/\"//g | sed s/,//g >katzenbilder.txt | |
while read line | |
do | |
date=$(date) | |
a="Ich mag Japanische Katzenfotos. $date: https://twitter.com/dewomser/status/$line" | |
twurl -u twitteruser -X POST "/1.1/statuses/update.json?status=$a" | |
echo $a | |
sleep 15 | |
done < katzenbilder.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
requested: Linux, twurl, twitter developer account