10/22/2023 0 Comments Twitter save video bot![]() ![]() ![]() #!/usr/bin/env python import sys from twython import Twython tweetStr = "RIP Peeraphan Palusuk, 68, Thai politician, Minister of Science and Technology (since 2013), MP for Yasothon (since 1985)" # your twitter consumer and access information goes here # note: these are garbage strings and won't work apiKey = 'roasdkoqwkk8i10kwks09aka' apiSecret = '4ghmkjal810kdla0wkkoasi' accessToken = '1239821-dakos81koamow9918ma0sadsqq' accessTokenSecret = 'saklasooqjdoajfj8f9981mska01mdka09' api = Twython(apiKey,apiSecret,accessToken,accessTokenSecret) api.update_status(status=tweetStr) print "Tweeted: " + tweetStr - cntl-X, Return will save the script (I know, I know, the variable names are different in the screenshot than the script I wrote. And substitute your own api key, api secret, access token and access token secret instead of using these. I created the bot using Twitter4j library and SQLite to store the tweet id’s to prevent duplicate response. It makes use of the twitter API to fetch the download link. The bot replies with a link to download the video. Put a different string in than my RIP string - this is for testing JustDiedBot. User finds a tweet containing a video or gif. All you have to is whenever you came across a Video you like on twitter just click on the tweet then reply the tweet mentioning the bot along with keyword download for example the reply can. Nano tweet_test.py Try this script, only with your API key, API secret, Access token and Access token secret. ![]() In this case, I prefer ssh, since I can copy-and-paste the application keys directly. Ssh into your Raspberry Pi, or else use the monitor. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |