There is a Twitter user who posts valuable stuff and I want to save his tweets not as text but as images (screenshots) just as you see it on your phone or computer.
I installed python-twitter and tweepy but I didn't find a solution in the docs and neither in communities so far.
Alternatively: Is there another way to save tweets in a kind of pretty, visually appealing way?
Thank you in advance.
With those libraries you can only extract Twitter data. Those aren't image processing libraries. You will have to write your own logic how you want those pictures displayed.
Look into Pillow.
I usually use this site called tweetcyborg.com It converts any tweet into an image.
I figured it out. Using Selenium Webdriver to open the Twitter account page in the browser, then scrape the tweets and use a screenshot tool to make an image. This looping through all tweets.
Related
I am checking Twitter Geo-search by implementing various samples by coping the same methods from this link http://thoughtfaucet.com/search-twitter-by-location/examples/.
My goal is to taking geo-search content into RSS format. I already have twitter rss search application, and now just need to put valid contents.
However, when I put something like this (geocode:41.878114, -87.629798,50mi) into Twitter search query, there is no result. The location is in Chicago, IL, and I believe it should have some tweets.
Does anyone use this practice to find surrounding tweets?, or please help and let me know if I am doing wrong.
Thanks,
The example you included has a space which should be removed.
geocode:41.878114, -87.629798,50mi
vs
geocode:41.878114,-87.629798,50mi
I understand you can get the specific url of a tweet using the Twitter API by creating a url like this
https://twitter.com/username/status/tweet-id
However, is it possible to get an image of a tweet?
I can get media images, but those are just images that people posted in the tweet. I want to know if it is possible to get an image of the tweet itself.
Twitter's API includes the ability to do this with oembed.
https://dev.twitter.com/rest/reference/get/statuses/oembed
See https://opensourcelibs.com/lib/tweets-as-an-image
This project provides an API for downloading tweets as images: https://tweets-as-an-image.herokuapp.com/tweet?twitterHandle={your_twitter_handle}&id={your_tweet_id}&theme={light_or_dark}&maxwidth={max_width_of_your_tweet_image}&height={height_of_the_image}&lang={language}
Fast forward to 2023 - none of the one above seems to be available anymore.
This library worked flawlessly for me. It is not an web API but works well and has good options:
https://github.com/Xacnio/tweetcapture
You can now get images or screenshots of tweets using the #aissistant handle on twitter.
Retweet any tweet with the comment "#aissistant #image" to get an image.
Retweet any tweet with the comment "#aissistant #screenshot" to get a screenshot.
For other options like converting to memes and jokes check out the handle.
Full disclosure: I am creator of the bot behind the handle.
I'm trying to create images streams from social media hashtag.
When i try to using Twitter, there's a problem when getting tweets images. I already succeed displaying the images but there's a lot of duplicate tweets! The reason is there's a few users who tweet same tweet, and i think they all are bot because when i stalk their profile they all got same tweets.
Here is the example :
http://t.co/NMX3B68eBT http://t.co/xDeBSS7GRr http://t.co/VmmNezY8Qg
Here is the query :
$response = $twitter->get('search/tweets.json?q=%23holifestival -filter:retweets filter:media&count=20');
How do i fix the duplicate tweets like this? is it possible?
if it's isn't, is there any workaround? please help me.
thanks
You really only have two options.
Compare the text (ignore the URL) and see if it matches a previous tweet. If it does; discard it.
Compare the images. After downloading the image, compare it to other images you've downloaded (either filesize or MD5 hash). If it matches, discard it.
One of Twitter's problems is that multiple spam accounts can be used to repeatedly broadcast identical content. Other than examining the content, there's no way in the API to filter it.
I want to embed the latest image uploaded to yFrog for a particular user on another site. They appear to have recently launched a widget, and I've found some talk of RSS feeds. But everything relating to them seems to have been pulled from the yFrog site recently. Any ideas?
You should try implementing a Yahoo! Pipe using Twitter and yFrog API to generate an RSS. Here is mine: http://pipes.yahoo.com/norbertcsik/twitter_images
It looks like they used to support, but it doesn't look like it works anymore.
For evidence, see this and this.
is there any service from where we can download tweets?
UPDATE!!!
Googling for sometime gave me this result
a.) http://snap.stanford.edu/data/twitter7.html
b.) http://140kit.com/datasets
Yes, there is. It's called the Twitter API.
As we have access to limited tweets by Twitter-API, we should make use of third-party resellers like Topsy for just the past data, GNIP just for streaming data, or DataSift for both streaming data as well as past data.
You might also want to check the following sites:
http://www.infochimps.com/collections/twitter-census
http://www.tweetarchivist.com/
Twitter API allows provides partial results, it gives you the last 100 or even 500 tweets fo every search. If you need to keep tweets long term, twitter API shows its limits.
I had same need as you apparently hae and I developed a tool that queries twitter API periodically and stores search results on a Wordpress database.
I called the tools twittcorder and you can find a live demo on twittcorder.com
I hope this helps.
These other data sources are probably shared against the Twitter TOS. I wouldn't want to invest my time and effort building something on datasets that are non-repeatable. The Twitter Streaming API allows collection of a sample of Tweets.
There's also Gnip: http://gnip.com/.
Sysomos is there for complete data analysis including twitter, faecbook and various boards and forums