Skip to content

Instantly share code, notes, and snippets.

@dewomser
Last active June 8, 2023 15:22
Show Gist options
  • Save dewomser/fa6379f1af4f482caea4eceefe4ffe46 to your computer and use it in GitHub Desktop.
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
#!/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
@dewomser
Copy link
Author

dewomser commented Feb 5, 2023

requested: Linux, twurl, twitter developer account

@dewomser
Copy link
Author

dewomser commented Jun 8, 2023

kaputt 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment