Thank you guys for your support 🙂. I made new videos about getting tweets from users or tweets by keywords/hashtags, and streaming tweets in real-time. Links of the videos are in the description.
@nitinluthra1751
2 жыл бұрын
Hi! You write code that is elegant and systematic. In your 2 videos, the file with keys and token do not use the bearer token which I think is creating problems for me. I am having trouble getting tweets older than 7 days via academic access-authenticating my account and then searching a sizable number of tweets using hashtag and a specific date. It will be very helpful for researchers to have another video on this topic!
@datareactor4143
2 жыл бұрын
can you kindly help me if we want to download tweets for a specific subject? i tried making changes to the public_tweets = api.home_timeline() line but was not successful after some experiments.
@Ilham-ct4mk
Жыл бұрын
Hi thanks for the video, and I'm getting this error like below raise KeyError(key) KeyError: 'twitter' Can you have any comments on this
@khushiverma3467
Жыл бұрын
@@Ilham-ct4mk your issue solved ??
@hnn1335
10 ай бұрын
Elevated access is now basic access and I have to pay 100$ a month to access tweets.... I was so excited to follow along this project
@Vitotheking100
2 жыл бұрын
Great video. This is the only resource I found online saying I need elevated access. Thank you
@violapastorino5845
2 жыл бұрын
Thank you so much for this video! You are such a good teacher the Netherlands is lucky to have you!
@aispectrum
2 жыл бұрын
Thanks a lot for the nice words! 😊
@nehat786
2 жыл бұрын
It would be great if we see real-time tweets of any particular account. There is not much information on that as of now. Would be helpful for us. Thanks. Appreciate your effort. God bless you!
@aispectrum
2 жыл бұрын
I appreciate your nice words 😊. I'll indeed look into this topic in next videos.
@pepex90
2 жыл бұрын
Hi !! I have this exception: "453 - You currently have Essential access which includes access to Twitter API v2 endpoints only. If you need access to this endpoint, you’ll need to apply for Elevated access via the Developer Portal." But in the Developer Portal i have all proyects in Elevated Access 🙁
@riyagupta1841
Жыл бұрын
Same here Could you please tell me how can I resolve this problem?
@Zer0-0
Жыл бұрын
It's a pain in the ass, you have to set up stuff
@enescerrahoglu
Жыл бұрын
were you able to solve this problem?
@laarx8911
2 жыл бұрын
Thank you so much!! This tutorial is the easiest one to follow!
@kchen9914
2 жыл бұрын
Many thanks for your video. It's extremely useful. I am a PhD student, and I am trying to extract tweets according to keywords. I'll target your video. Thank you very much!!!
@aispectrum
2 жыл бұрын
Thanks for the nice comment. Happy to hear that video could be helpful to a fellow PhD student!
@kchen9914
2 жыл бұрын
@@aispectrum Thank you for your kindly reply. I've got an academic research API. I just tried to follow your code step by step, but I am stuck at video 11:30. I got the return "453 - You currently have Essential access which includes access to Twitter API v2 endpoints only. If you need access to this endpoint, you’ll need to apply for Elevated access via the Developer Portal". I am struggling with it. I am not very familiar with coding and Twitter API, but my research requires this. So I am trying my best to do it. If possible, could you please give me a clue? Thank you very much. God bless you.
@kchen9914
2 жыл бұрын
@@aispectrum thank you, my friend, my issue is gone, I solve it.😆
@KulturanCov
2 жыл бұрын
you can also use pandas json_normalize() function, which transforms a json dic into a nice pandas DataFrame. tweets = pd.json_normalize(response["data"]) tweets With tweepy you would need to change the return_type to requests.Response. client = tweepy.Client( bearer_token=BEARER_TOKEN, return_type = requests.Response # Needed to use json methods, which makes life much easier )
@nihalshukla0913
Жыл бұрын
Jay Shree Baba Mahakaal Ji Har Har Mahadev Ji Jay Shree Aai Shree Kulswamini Maa Tuljabhawani Maiyaa ji Jay Shree Maa Harsaddhi Bhawani Maiyaa ji❤
@bluespider6537
2 жыл бұрын
Hi thank you for creating this short guide! really helpful to get started with twitter API
@aispectrum
2 жыл бұрын
Thanks for the feedback! Glad it was helpful! 🙂
@illushop2.o382
Жыл бұрын
Hello Can you help me?? Actually I stuck in public_tweets. There are showing errors. So please
@courtneytan7418
Жыл бұрын
This was so well done! Bravo!
@sazid_mahmud
2 жыл бұрын
Thanks for the video. I was searching for something like this.
@seyiojo4041
2 жыл бұрын
I cant seem to get past the creation of the developers' account.
@april147
2 жыл бұрын
It saved my life! Thank you so much!
@cindypadilla832
2 жыл бұрын
Thank you for the video.I am a beginner in the subject and so far, your content is so interesting and useful.
@aispectrum
2 жыл бұрын
I'm happy to hear that the video was helpful 🙂
@illushop2.o382
Жыл бұрын
@@aispectrum Hello Can you help me?? Actually I stuck in public_tweets. There are showing errors. So please
@BabakRoumiani
Жыл бұрын
چاکر بچون خرموعه، دمت گرم
@CuriouslyWatching
2 жыл бұрын
I love your tutorials I learnt a lot when making a sentiment analysis project for my school
@aispectrum
2 жыл бұрын
Glad you like them!
@illushop2.o382
Жыл бұрын
Hello Can you help me?? Actually I stuck in public_tweets. There are showing errors. So please
@Joy381GT
Жыл бұрын
hello is there any callback url or website url tht i can fill, because it required right now
@jaymorad7095
Жыл бұрын
Thanks so much for this it was extremely helpful. Also going to watch your video relating to searching using keywords. However, can you recommend how to get tweet images that users had posted?
@BeWorded
Жыл бұрын
You are quite a teacher! Thank you so much!
@ayorinde5782
2 жыл бұрын
how do i run the code in vs code terminal window
@irshadshaik2994
2 жыл бұрын
Does it take a long time to get the twitter developer account? Or will it be created as soon as you agree with the terms and conditions
@mrpoopybutthole666
Жыл бұрын
omg now it costs 100$
@dianyinghunjian
2 жыл бұрын
Is there a way to no auth??
@woolfy02
2 жыл бұрын
So, this tutorial uses 'OAuth 1.0a' correct? I don't see any option too 'edit app options' on 2.0. And OfCourse I can't save those settings until I figure out the 'Callback URI / Redirect URL' and 'Website URL' which Is not in the tutorial here. Twitter changes things around way too much
@aispectrum
2 жыл бұрын
Yes. I saw that too. You can try to enable OAuth1 on the website and use the link to your GitHub repository for the callback URL.
@imaduddinfarih4835
2 жыл бұрын
hello AI spectrum.. its a great tutorial.. easy to understand thank you, and really appreciated. does it work in essential access or we have to upgrade to elevated access ?
@aispectrum
2 жыл бұрын
Well I don't think you can run this code with essential access. Essential access only allows you to connect to API v2 (this is equivalent to using tweepy.Client class). But I use API v1.1 here (since I use tweepy.API class).
@imaduddinfarih4835
2 жыл бұрын
@@aispectrum thank you
@giannisbk4336
2 жыл бұрын
Thank you for the video. This is very helpful!!!!
@marianomeses403
2 жыл бұрын
you're a genius. un saludo carnal, excelente video.
@bobvance9519
Жыл бұрын
Excellent tutorial!
@khushboo8710
2 жыл бұрын
It was really helpful for me, Thank you!
@illushop2.o382
Жыл бұрын
Hello Can you help me?? Actually I stuck in public_tweets. There are showing errors. So please
@Restlesscrocodile
2 жыл бұрын
Thank you my lovely, this was really helpful. I was wondering if there was a way to change the date/time format? At the moment, it comes out as something like [2022-04-29 14:58:39+00:00] - which cannot be recognised as a date in excel.
@cecer3795
2 жыл бұрын
Sooooo helpful!!! Thank you so much for your video :-)
@aispectrum
2 жыл бұрын
Glad to hear that this was helpful 🙂
@maaknunalam8579
2 жыл бұрын
Very helpful video, thank you. Could you kindly show how to possibly find tweets with specific keyword matching; also how to run the script in a server to keep extracting data continuously. Thank you !!!
@aispectrum
2 жыл бұрын
I’m happy that it was helpful to you. You can check my new video for getting tweets by keywords: kzitem.info/news/bejne/p6OYq5yBjKKDaoI
@shitabtanzim2037
2 жыл бұрын
Thank You. It was very helpful.
@RyanPu-js9gl
2 жыл бұрын
Great video! Thanks a lot for sharing this! I have two questions though: 1. Is it possible to use your method to collect, say 10k tweets, at one time? I tried but only returned about 1k tweets. 2. What's the difference between tw.Cursor() and tw.Paginator()?
@aispectrum
2 жыл бұрын
Unfortunately the API restricts the tweets that you can get with essential access. If you want to get more tweets, you need to elevate the access, for example to academia access. For the second question, Cursor() is for pagination of API v1.1 methods (this is when we write tweepy.API for instantiation), but Paginator() is for API v2 (that is tweepy.Client).
@geraldwinata8346
2 жыл бұрын
@@aispectrum Sir, I have elevated access but it only collect 100 tweets. How can I collect 1k tweets for a single csv?
@latanff3511
Жыл бұрын
@@geraldwinata8346 you got It?
@neroonose4585
2 жыл бұрын
Best ever. Thank you so much
@R4idho
Жыл бұрын
Awesome! Thanks!
@Juan-Hdez
Жыл бұрын
Very useful. Thank you!
@AndresVeraF
2 жыл бұрын
Thanks for this video & subscribed !
@aispectrum
2 жыл бұрын
Thanks 🙂
@ahmedutuber
2 жыл бұрын
thank you to much, we learning us with you new skill tweetpy API 🙏🙏🙏🤝
@secondaccountadlinaluthfia6099
2 жыл бұрын
i love the video sound quality
@TheStianchris
2 жыл бұрын
Great video, thank you very much!
@theroundaboutpodcast7595
2 жыл бұрын
clear and easy to understand.
@xtzewka4107
2 жыл бұрын
Hi @AI sectrum, could you say what should I put in fields CallbackURL & Website URL on twitter dev site at registration process (when they ask me to choose between different type of OAuth(I'm choosing 1.0a)? Without filling those fields I can't finish the registarion and I can't give my app write & read permission. I have no clue what I should put in there
@aispectrum
2 жыл бұрын
I see that they now changed a bit the UI. As you figured it out, you should now change the app premission in the User authentication settings section. Just choose OAuth 1.0a, give to your app the read/write permission, and for the Callback and Website URLs, you can simply give the link to your github repository.
@xtzewka4107
2 жыл бұрын
Cool, thank you
@aviezerlawee2883
2 жыл бұрын
@@aispectrum So, i did this and im still getting a traceback bad request 400 215 tweepy error bad authentification data. Imma check the keys one more time. Really excellent video
@pepex90
2 жыл бұрын
Great video, thank !!
@ppsweetanny
2 жыл бұрын
Hi after write the code for print(api_key) in my MacBook I found an error can you please help me on that
@danrock9285
2 жыл бұрын
Hi, friend. Thanks for the video! I need to store hundreds of tweets safely; and use them later (in original format) in my thesis, throug an easy way. Does Tweepy do that, or just returns text and metadata? Is there some sort of "recoversion" to original format?
@aispectrum
2 жыл бұрын
I don't think you can use the API for this. API only returns the data in json format. If you want to do save them in original format like twitter website, you may have to write a script with HTML + CSS + JS to get what you want.
@danrock9285
2 жыл бұрын
@@aispectrum Thanks!
@cynding2661
2 жыл бұрын
Very helpful!
@roberttyler2861
2 жыл бұрын
This is a great tutorial - thank you. How would you add to the list? I want to store more than say the 300 but say 10,000 or so?
@aispectrum
2 жыл бұрын
According to the official API document, you can get up to 800 tweets from home timeline. For this, try using tweepy.Cursor and passing to it api.home_timeline
@comradeff7241
2 жыл бұрын
Is this only worked for elevated access accounts?
@santiagoacosta3
2 жыл бұрын
yes
@aispectrum
2 жыл бұрын
Yes, since I use tweepy.api() that needs elevated access.
@alexochoki7533
2 жыл бұрын
good stuff, very helpful
@subratasaha8820
2 жыл бұрын
awesome explanations. i have completed all three videos and successfully extracted tweets. however, if I need only 'English' language tweets, where to modify in the code? can you help me on this? # please upload more videos.
@aispectrum
2 жыл бұрын
Thanks! For filtering based on language, you can pass to api.search_tweets the parameter lang='en'. For streaming, pass to stream_tweets.filter the parameter languages=['en'].
@subratasaha8820
2 жыл бұрын
Thanks@@aispectrum
@Lumiere10x
2 жыл бұрын
Thanks so much for this it was extremely helpful. Also going to watch your video relating to searching using keywords. However, can you recommend how to get tweets as much as say 5000-10,000? I currently have the elevated access. IF its not possible can you suggest methods we can try out? Looking forward to your reply.. Thanks
@jonasschaf911
Жыл бұрын
Hello, why do i get this message? tweepy.errors.Forbidden: 403 Forbidden 453 - You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media post, oauth) only. If you need access to this endpoint, you may need a different access level. Help me pls 😅😅
@shurooqaldaja912
9 ай бұрын
You have to pay
@mbegaliful
2 жыл бұрын
excellent, thanks!!
@annarocha9769
2 жыл бұрын
Thank ypu sooooo much!!! this is greattttttttttttttttttttt
@HelloNewMe1996
2 жыл бұрын
hello.. i try to use the code but i have an error . tweepy.errors.Forbidden: 403 Forbidden 453 - You currently have Essential access which includes access to Twitter API v2 endpoints only. If you need access to this endpoint, you’ll need to apply for Elevated access via the Developer Portal. please help me
@yhk6187
2 жыл бұрын
thank you so much for this. by the way, how can i define the time length? for example, I would like to search tweets containing certain keyword or hashtag posted between 2022-01-01 to 2022-02-01. If this is not possible. Could you give me any suggestions about this?
@aispectrum
2 жыл бұрын
For getting tweets by searching keywords/hashtags, you can check out this video: kzitem.info/news/bejne/p6OYq5yBjKKDaoI For the time period, just pass the until parameter to the search_tweets method, something like until='2022-02-01'. Just have on mind that the api only reteruns tweets that are 7-days old.
@mbegaliful
Жыл бұрын
This is probably a stupid question (and slightly out of topic).However, I try anyway. I don't get this section: config = configparser.ConfigParser() config.read('config.ini') api_key = config['twitter']['api_key'] How can you use the variable "config" in config['twitter']['api_key'] to have access to the file( config.ini) when the file is not read yet? In my VERY RUDIMENTAL knowledge of Python I would expect something like: config = configparser.ConfigParser() x = config.read('config.ini') api_key = x['twitter']['api_key'] Am I completely off mark? Thanks!
@fakiimohammedmwapore1637
2 жыл бұрын
nice content, was helpful
@spinout77
Жыл бұрын
Thanks for the instructions and the video! I am still stuck in the set up process: when giving the app the read and write permission, I also have to specify a Callback URI / Redirect URL and a Website URL. This information is required. What do I have to enter there? I have neither a Callback URI nor a website to refer to.
@randagha3283
2 жыл бұрын
Thank you a lot!! could you please upload a video on how to retrieve tweets with specific words?
@aispectrum
2 жыл бұрын
I have plan to publish a video for this after holidays.
@juanharu
2 жыл бұрын
@@aispectrum looking forward to this subject too! thanks for this tutorial very informative!
@banonenbob7641
2 жыл бұрын
@@aispectrum Specific words or users would be great. For example return all the tweets mentioning @Facebook for example.
@justaguy7589
2 жыл бұрын
U should make a video on replying to users with media
@philipung5335
2 жыл бұрын
Thanks for this video, it was very useful Just note, I noticed in this video and when doing a similar project, the tweets are not printed into full text and so tweets that are long in length are replaced by ... And so is there any way to get around this, as this is holding me back from getting a large dataset. Thanks in advance
@aispectrum
2 жыл бұрын
You’re right. The Twitter API by default only returns 140 characters. To avoid this, put tweet_mode=‘extended’ in the api.home_timeline method. Also use tweet.full_text, instead of tweet.text, to read the tweet.
@philipung5335
2 жыл бұрын
This is my code, and the tweet_mode parameter doesn't work in my function. Also the tweet.full_text doesn't work, so this is a barrier, so Im not sure how to get around this. cursor = tweepy.Cursor(api.search_full_archive, label="Tweets", query="Bitcoin", fromDate="202001010000", toDate="202012312359").items(number_of_tweets) for i in cursor: tweets.append(i.full_text) likes.append(i.favorite_count) time.append(i.created_at) retweets.append(i.retweet_count)
@aispectrum
2 жыл бұрын
@@philipung5335 I do not have an Academic Research access to run the search_full_archive method. What you can do is to check the json data that you get from the API. First see if the "truncated" element is True, then inspect the data and look for "extended_tweet" element, this has the full text.
@philipung5335
2 жыл бұрын
Thanks for your reply. I will give that a try, but Im a newbie to coding, so Im not sure what you mean by 'check the json data'. I only have elevated access which includes premium v1.1
@---kt5xz
2 жыл бұрын
@@philipung5335 did you got full text
@flavianitzlader8981
Жыл бұрын
Hi, thanks a lot for this, I'm a beginner at Python and was struggling how to get started before seeing this. I have done all the steps as you do, but for some reason when I want to import tweepy it doesn't show even though I previously installed it using pip3. Configparser works fine though. I have not yet heard back from twitter regarding my elevated access, could that be the reason?
@RobCloseMusic
Жыл бұрын
What is the point of all this? Does this method strengthen the tweet to reach a larger audience? trying to understand how to better my sent tweets
@CelskySiBunnyHop
Жыл бұрын
hi sir, i would like to learn this content for my thesis and i want to ask something. How it works with emoticon because i saw the output print emoticon? thankyou
@camiloninguem495
Жыл бұрын
Thank U so much, I had problems with the separators, so much tweets .text has comas or tabs or | , when I import this to excel (for example) is imposible. How I can converter to numpy object?
@jinjjasugoi1213
Жыл бұрын
when i type "pip install tweepy" in terminal it gives me this... ip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. why is that?? HELP PLEASEE!
@Provloging789
8 ай бұрын
It will throw error for tweepy.. May I know what is the latest version
@hindal-humaidi5567
2 жыл бұрын
When I save data to CSV with pandas and open it in excel, the data does not order and it is a mess situation 🙂
@RobCloseMusic
Жыл бұрын
what was the point of all that?... Are you actually changing it to your own custom code, thus delivering the tweet to a larger audience?
@miracleuche586
Жыл бұрын
Thank you so much for the helpful and succint video. Please, how can I run these codes on Jupyter notebook? Being unfamiliar with VS Code text editor, I find it challenging to replicate these codes on my notebook. I need help.
@aishwaryaahuja6456
Жыл бұрын
it is not showing apply for elevated when I am trying. It is jumping to the payment website
@ONRISEAI
2 жыл бұрын
Great video, 👍 Can we have more than 1 developer app? I already have an autoposter so it's not letting me add a different dev app only Production & Staging. 😕
@onanaonana325
2 жыл бұрын
My list of tweets, dataframe are empty. i don't understand why
@aruf8740
2 жыл бұрын
bro thank you, you saved me
@egiwahyu4377
Жыл бұрын
Sir i thought i miss the section or don't understand completely. But i want to ask you how to connect your tweet to the code? I didn't get it. Coz i didn't see any of your twitter account name in the code...
@bahadirbirim7736
2 жыл бұрын
It is not that that easy to get a twitter developer account. How could you get it in a second? I applied for three times and got rejected.
@aispectrum
2 жыл бұрын
After my application, it took some time. I indeed received some emails asking to be more precise, why I need the developer account and so on. I was always replying that it was for teaching purposes.
@user-yg3ih9vr9k
Жыл бұрын
Appreciate you sir
@yingchai984
Жыл бұрын
Thanks ALOT!
@Essoulefou
2 жыл бұрын
Hello ! thank for the video. I'm a beginner, I have an error at the first print and I dont know why. Traceback (most recent call last): File "c:\Users\****\Documents\VisualCode\try\twitter_api.py", line 9, in api_key = config['twitter']['api_key'] File "C:\Users\****\AppData\Local\Programs\Python\Python310\lib\configparser.py", line 964, in __getitem__ raise KeyError(key) KeyError: 'twitter' Do you have an idea? :/
@peterm1697
Жыл бұрын
Same boat. Have you found the solution?
@user-io4tb8gw6h
10 ай бұрын
Thank you, I believe collecting Twitter data with a free developer account is no longer possible. Is this correct?
@DumindaKuruppu
2 жыл бұрын
Thank you !
@yusamuel4900
Жыл бұрын
Thank you so much.
@mouse6653
2 жыл бұрын
Hello, I got a problem with sign up a account Twitter Development. They need I show the purpose to sign up. Can you help me? Many Thanks
@Ankansworld
2 жыл бұрын
Even after having the correct API keys and Elevated access, I am getting TweepError: [{'code': 89, 'message': 'Invalid or expired token.'}] Can someone please help? I want to get tweets based on a specific hashtag.
@antonkostov1691
2 жыл бұрын
Really cool stuff. Thanks. I became a subscriber and will definitely be checking your channel.
@aispectrum
2 жыл бұрын
Awesome, thank you!
@lloivne411i9
2 жыл бұрын
Thanks for your sharing.
@SandeepSingh-oc1rr
Жыл бұрын
Elon uncle changed everything, now we have to pay, inorder to get the tweets is there any other way of getting tweets.
2 жыл бұрын
Thanks for great video and coding. Can you find how many times tweet and share your tweet ? (meaning count)
Жыл бұрын
Yok hayır
@meleseayichlie5645
Жыл бұрын
thank you guys for your valuable support, but i have a question how to download hate speech image in twitter
@mallekumari626
Жыл бұрын
Hi thanks for the video, and I'm getting this error like below raise KeyError(key) KeyError: 'twitter' Can you have any comments on this
@Ilham-ct4mk
Жыл бұрын
same
@Ilham-ct4mk
Жыл бұрын
you can solve that?
@moonsha5851
2 жыл бұрын
Hello, I want to learn this course. I applied twitter developer account three times and all of them has been rejected. Could you help me apply a twitter developer account? Thank you most warmly.
@edziogiorsetti1832
2 жыл бұрын
Thanks!!
@bobvance9519
Жыл бұрын
I wonder how one might save other things like searches and hashtags or other pages on twitter.
@Nikhil123477
Жыл бұрын
After making developer account how much time it takes to have access?
@IbrahimFajar
2 жыл бұрын
Thank you very much 🙂
@kaandoesstuff3402
2 жыл бұрын
I can't make an app after the essential access. It wants me to have the elevated access to make an app. Got rejected 3 times. In one of my applications I copied exactly what someone else wrote. They got accepted but I got rejected. Very strange. Am I missing something? Thank you.
@aispectrum
2 жыл бұрын
Unfortunately sometimes twitter staff are strict for accepting the application. You may try to explain that you only want to use the api for personal or educational use, and you won’t share the twitter data. If still they didn’t accept the application, you can get data by scraping twitter (you may check my last video for this)
@SaranyuSudharsana
Жыл бұрын
Hi Al Spectrum, I'm getting key error twitter . I dont why and I couldn't find the reason could help me please it is for my research
Пікірлер: 273