How I get Tweet data for FREE in 2024 as a data scientist

Поділитися
Вставка
  • Опубліковано 6 січ 2025

КОМЕНТАРІ •

  • @aispectrum
    @aispectrum  5 місяців тому +13

    To run the code, use *pip install “twikit==1.7.6”* to install the _twikit_ package. The latest update of _twikit_ deprecated the synchronous method which is used in the code.

    • @laidkahloul322
      @laidkahloul322 4 місяці тому

      thanks a lot for this nice video. I am facing a problem with this code:
      here is one of the first problems when doing it:
      for tweet in tweets:
      TypeError: 'coroutine' object is not iterable
      sys:1: RuntimeWarning: coroutine 'Client.search_tweet' was never awaited
      I am using Pycharm and Python 3.10 ??? any idea

    • @laidkahloul322
      @laidkahloul322 4 місяці тому +4

      when I use the twikit==1.7.6, I got this error:
      raise BadRequest(message, headers=response.headers)
      twikit.errors.BadRequest: status: 400, message: "{"errors":[{"code":366,"message":"flow name LoginFlow is currently not accessible"}]}"

    • @carlota2001bbb
      @carlota2001bbb 4 місяці тому +1

      @@laidkahloul322 Hey. I'm encountering the same error. Did you find a way of fixing it?

    • @MaxMinExtremum
      @MaxMinExtremum 4 місяці тому +3

      Hi Mehran I have the same issue
      twikit.errors.BadRequest: status: 400, message: "{"errors":[{"code":366,"message":"flow name LoginFlow is currently not accessible"}]}"
      please help us Mehran jun

    • @AndrianjafiniainaTojonirina
      @AndrianjafiniainaTojonirina 4 місяці тому

      Hey ! I get a "key Error : Open Account" when attempting to log in. Could anyone help ? Pls

  • @RaulMercado
    @RaulMercado Місяць тому +6

    You are a genius man! I am doing a thesis about epidemiological models applied to information difussion in Twitter, and of course I will need lot of tweets. Thanks!

    • @Pythonist_01
      @Pythonist_01 Місяць тому

      ok it gives an error i think twitter has blocked access

    • @umerkarbari8409
      @umerkarbari8409 Місяць тому

      is it working?

  • @WillTrades-j7x
    @WillTrades-j7x 3 місяці тому +4

    Bets video on the internet regarding this topic. You have no idea how much this helped me. 17:54 made me chuckle ahah

  • @marcositurbide3788
    @marcositurbide3788 14 днів тому

    Gracias! Me sirvio bastante
    Tuve complicaciones, pero al final pude hacerlo funcionar

  • @codebyheart5067
    @codebyheart5067 5 місяців тому +1

    this is very wonderful lecture keep it up bro you are doing wonderful job and this video is very helpful for me thanks for this

  • @zoheirkabuli
    @zoheirkabuli 4 місяці тому +4

    You're a life saver

  • @markr87
    @markr87 3 місяці тому +1

    You are an amazing tutor. Bless you

  • @matejpatek9395
    @matejpatek9395 4 місяці тому

    Keep it up man, appreciate the work

  • @拔
    @拔 5 місяців тому +4

    Synchronous version was deprecated from version 2.0.0. Therefore the code in this video will no longer work and needs to be updated to asynchronous. You can find more information in the documentation or on the release page.

    • @MonicaRotulo
      @MonicaRotulo 5 місяців тому

      it works for my by installing the appropriate version: pip install “twikit==1.7.6”

    • @YT-xm2zl
      @YT-xm2zl 3 місяці тому +5

      Can u send the documentation

  • @bharatkori659
    @bharatkori659 Місяць тому

    It was very helpfull for me as a aspiring Data Scientist

  • @MidasEstanislao
    @MidasEstanislao 4 місяці тому +1

    Me funciono. Gracias por tu tiempo, tienes nuevo suscriptor.

    • @GermanSantos
      @GermanSantos 3 місяці тому +1

      Puedo saber o ver tu script? yo tengo el clásico error del que la mayoría se queja, me ayudarías muchísimo, gracias.

  • @stanleychukwuemeka8841
    @stanleychukwuemeka8841 5 місяців тому +3

    Nice one man keep doing good 👍
    Please will this work for streaming tweets I real-time for a specific region or will the rate limit affect it even after using the TooManyRequest class?

  • @mohsenshahi9750
    @mohsenshahi9750 2 місяці тому +3

    it's killing me..
    status: 400, message: "{"errors":[{"code":366,"message":"Missing data."}]}"

  • @OmerHarbi
    @OmerHarbi 4 місяці тому +8

    how can I handle this error with twikit " BadRequest: status: 400, message: "{"errors":[{"code":366,"message":"flow name LoginFlow is currently not accessible"}]}"

    • @StasCherneshoff
      @StasCherneshoff 3 місяці тому

      Im getting the sane error now. As soon as he released the video my code worked and I got 3000 tweets..., now looks like X saw this video and change the access. Now Im stuck in the middle of my project with no more new tweets....

    • @ChristonLedgePaliza
      @ChristonLedgePaliza 3 місяці тому

      same error, what must we do?

    • @ramblingsofadegenerate1174
      @ramblingsofadegenerate1174 2 місяці тому

      @@StasCherneshoff yes me too have you found a work around

  • @gabrieldelrosario6692
    @gabrieldelrosario6692 Місяць тому

    Very valuable video, thank you

    • @Lang-kid
      @Lang-kid Місяць тому

      Do you run the code successfully?

  • @gabokings260388
    @gabokings260388 Місяць тому

    👏👏👏👏👏 genius!!!

    • @TienPham-kb6xr
      @TienPham-kb6xr 24 дні тому +1

      can you run the code successfully?

    • @gabokings260388
      @gabokings260388 24 дні тому

      @@TienPham-kb6xr yeah men, I ran it successfully several times to the point where my Twitter account got blocked🤣🤣🤣

    • @gabokings260388
      @gabokings260388 19 днів тому

      @@TienPham-kb6xr I was able to run it locally, and it worked, but my Twitter account got blocked from overuse

  • @carolinaarroyo1785
    @carolinaarroyo1785 3 місяці тому +4

    please need your help i am doing a project and i have this error:
    Exception has occurred: BadRequest
    status: 400, message: "{"errors":[{"code":366,"message":"Required input 'LoginAcid' not provided."}]}"
    Someone know how I can fix it?

  • @MiniMinds-Moments
    @MiniMinds-Moments 3 місяці тому +1

    Getting this error
    {"errors":[{"code":366,"message":"flow name LoginFlow is currently not accessible"}]}

  • @ShokoufehNaseri
    @ShokoufehNaseri 22 дні тому

    good job bro. the video is so clear and useful. do you know how can I apply for academic research access over X?

  • @laidkahloul322
    @laidkahloul322 4 місяці тому +5

    I am facing a problem with the code: for tweet in tweets:
    TypeError: 'coroutine' object is not iterable
    sys:1: RuntimeWarning: coroutine 'Client.search_tweet' was never awaited
    I am using Pycharm and Python 3.10 ??? any idea

    • @faqapour6166
      @faqapour6166 4 місяці тому

      I have this problem

    • @devanshnandwani4900
      @devanshnandwani4900 4 місяці тому +1

      same

    • @saikethanmadhadi1615
      @saikethanmadhadi1615 3 місяці тому

      They have upgraded the api from version 2.0.0 we need to call the api as async operation if we are calling with out async we will get coroutine issue check out there documentation for more details

    • @laidkahloul322
      @laidkahloul322 3 місяці тому

      @@saikethanmadhadi1615 Any code so? can you provide us with the required code please to get tweets? Thanks a lot !

    • @laidkahloul322
      @laidkahloul322 3 місяці тому

      @@saikethanmadhadi1615 Have you any code please? if you have it please send it or post it here! Thanks

  • @siddhubhai2508
    @siddhubhai2508 5 місяців тому +7

    Finally bro got his account's password!!!!

    • @xxtseed
      @xxtseed Місяць тому +1

      I just noticed, haha.

  • @rekakutasi7573
    @rekakutasi7573 День тому

    How can I retrieve tweets from Twitter nowadays without having to pay?

  • @SebastianAguilar-ec5ul
    @SebastianAguilar-ec5ul 2 місяці тому

    Do you know if the query syntax is different from that of the official API? When I try to use queries from the advanced search, I get errors in extracting data from the time frames I specified or the keywords I want to search for.

  • @nishah4058
    @nishah4058 2 місяці тому +1

    I ran this code.. I get error 403 again and again like forbidden error.. what will
    Be the solution?

    • @sepu321
      @sepu321 2 місяці тому

      i got the same

  • @ignacioibanez6332
    @ignacioibanez6332 Місяць тому

    Can anybody help me to run the code, i tried several times and i didn't worked.

  • @farhanalhafizh5874
    @farhanalhafizh5874 2 місяці тому +2

    hey guys just wondering, i follow every step on the video but when i run the program it says:
    Traceback (most recent call last):
    File "d:\S1\TA\Scraping data\scraping.py", line 67, in
    for tweet in tweets:
    ^^^^^^
    TypeError: 'coroutine' object is not iterable
    :0: RuntimeWarning: coroutine 'Client.search_tweet' was never awaited
    anyone know how to fix it?

  • @ramblingsofadegenerate1174
    @ramblingsofadegenerate1174 2 місяці тому +1

    is this api still working

  • @MikeHarris-p1b
    @MikeHarris-p1b 4 місяці тому

    Hello,
    when I try to run everything up to and including the client.search_tweets command, I get the following error:
    RuntimeError: 'run_cell_async' needs a real async loop
    An initial search was not helpful.
    Do you have any insight on this error?
    Also, could you please tell me how to search for tweets within a certain time frame (date ranges)?
    Thank you!

    • @MikeHarris-p1b
      @MikeHarris-p1b 4 місяці тому

      I am getting a different error after making some adjustments.
      RuntimeWarning: Enable tracemalloc to get the object allocation traceback
      Do you know how to resolve this issue?
      Thank you!

  • @ebukachuqz
    @ebukachuqz 3 місяці тому

    Thank you sir

  • @kachiokeke2773
    @kachiokeke2773 4 місяці тому

    is there a maximum number of tweets that can be fetched? I set a minimum of 1000 but it stops randomly between 90-600

  • @ahmetefekoroglu1563
    @ahmetefekoroglu1563 5 місяців тому +1

    it says RuntimeWarning: Enable tracemalloc to get the object allocation traceback how can i solve it

    • @StasCherneshoff
      @StasCherneshoff 5 місяців тому

      Same. TypeError: coroutine object is not iterable. 'Client.search_tweet' was never awaited.

    • @aispectrum
      @aispectrum  5 місяців тому +3

      Apparently there is a new update that removed synchronous api. The easiest way to run the code is to install the package before that update. Try
      pip install “twikit==1.7.6”

    • @StasCherneshoff
      @StasCherneshoff 5 місяців тому

      @@aispectrum works now, thank you. You should mention it in description, before you get the "does not work" sentiment in the comment section 😃

    • @antiwars9889
      @antiwars9889 5 місяців тому +3

      @@aispectrum
      Code displays an error message when doing this:
      Forbidden: status: 403, message: ""

    • @migvie3404
      @migvie3404 5 місяців тому

      @@antiwars9889 I also got the same... anyone figured out a fix?

  • @AndrianjafiniainaTojonirina
    @AndrianjafiniainaTojonirina 4 місяці тому

    I'm getting a "keyError : Open account" error when login. Could anyone help ?

  • @wicherast
    @wicherast Місяць тому

    anyone get "status: 400, message: "{"errors":[{"code":399,"message":"Sorry, we could not find your account. "???

  • @花开陌路-t8u
    @花开陌路-t8u 2 місяці тому

    twikit 2.13 Can the blogger update the code?

  • @exp_d_dragon
    @exp_d_dragon 3 місяці тому +2

    BadRequest: status: 400, message: "{"errors":[{"code":366,"message":"flow name LoginFlow is currently not accessible"}]}"
    //please need your help i am doing a project need this data please how can do that 😭

  • @yusufalkawri399
    @yusufalkawri399 2 місяці тому

    It doesn't work with me.

  • @user-tl1qc9ym2y
    @user-tl1qc9ym2y 2 місяці тому

    can you please provide the code , thank you

  • @giorgiopallucchini6578
    @giorgiopallucchini6578 Місяць тому

    Is it not safe for your twitter account?

  • @HitAndMissLab
    @HitAndMissLab 5 місяців тому

    you need to randomise it a bit more, with a decision tree, like doing some likes, re-tweets, maybe commenting with "Awesome" or "I agree" etc. That would look even more human.
    Can this new library handle proxies?

    • @aispectrum
      @aispectrum  5 місяців тому +2

      Nice suggestion! This can help to avoid the ban. And yes, you can pass proxy while initializing Client, like ‘Client(proxy=“0.0.0.0:0000”)’

  • @winicius12345
    @winicius12345 Місяць тому

    Still working?

  • @junbeompark3239
    @junbeompark3239 5 місяців тому

    awesome

  • @JETHITHORFAMILY
    @JETHITHORFAMILY 4 місяці тому

    can you make a script which will notify whenever the user posts a tweet ??

    • @ivansharygo
      @ivansharygo 9 днів тому

      subscribe to the user on the app and turn your notifications on?

  • @KalpanaNarayan-z7k
    @KalpanaNarayan-z7k 5 місяців тому

    im getting error!!! help me out please

  • @busracelik1165
    @busracelik1165 5 місяців тому

    I have to get the data of twitter nearly 1.000.000 tweets but these codes dont work it could you help me to get it?

    • @LolaErogs
      @LolaErogs 4 місяці тому

      Hello, did you find a solution for this?

    • @busracelik1165
      @busracelik1165 3 місяці тому

      @@LolaErogs no I am still working on it

    • @GloryBenedict-qs5sf
      @GloryBenedict-qs5sf 3 місяці тому

      @@busracelik1165 hello please I am also interested when you find a way to get the large amount of tweet

  • @sarahm8627
    @sarahm8627 5 місяців тому +1

    I am getting this error when running the code- is there a way to fix it?
    TypeError Traceback (most recent call last)
    in ()
    72 break
    73
    ---> 74 for tweet in tweets:
    75 tweet_count += 1
    76 tweet_data = [tweet_count, tweet.user.name, tweet.text, tweet.created_at, tweet.retweet_count, tweet.favorite_count]
    TypeError: 'coroutine' object is not iterable

  • @tuvshuutuvshuu4447
    @tuvshuutuvshuu4447 5 місяців тому

    i was using API before it was free. But it cant compare with API data. scraping data is way too different.

    • @aispectrum
      @aispectrum  5 місяців тому

      Agreed! Before it was way easier to get tweets 🥲

  • @faqapour6166
    @faqapour6166 4 місяці тому

    I need at least 3,000 tweets on #diabetes. please help me🥺. I can't do it.

    • @LolaErogs
      @LolaErogs 4 місяці тому

      Hello, have you been able to solve this?

    • @aispectrum
      @aispectrum  4 місяці тому

      Have you been able to run the script? Is there a problem with data collection or are you getting some error?

    • @GloryBenedict-qs5sf
      @GloryBenedict-qs5sf 3 місяці тому

      @@LolaErogshello, second time seeing you in the comments.❤

    • @LolaErogs
      @LolaErogs 3 місяці тому

      @@GloryBenedict-qs5sf looool frantically looking for a solution

  • @i.o4766
    @i.o4766 3 місяці тому

    1:24 can you explain why you imported all these things? I would like to learn this stuff but you're just saying what you're doing instead of explaining what it does or why you would want to do that.

  • @priyanshumathur7416
    @priyanshumathur7416 2 місяці тому

    It's givinng me the following error when I ran the initial code to get 1 tweet:
    for tweet in tweets:
    TypeError: 'coroutine' object is not iterable
    sys:1: RuntimeWarning: coroutine 'Client.search_tweet' was never awaited
    Anyone has a solution for that?
    P.S. - I really loved this video of yours

  • @krishnakhandekar7165
    @krishnakhandekar7165 4 місяці тому

    not working
    packages\twikit\client\client.py", line 160, in request
    raise Forbidden(message, headers=response.headers)
    twikit.errors.Forbidden: status: 403, message: ""

  • @markblakey7444
    @markblakey7444 Місяць тому +1

    Looks like X have blocked this.
    Returns
    twikit.errors.BadRequest: status: 400, message: "{"errors":[{"code":366,"message":"flow name LoginFlow is currently not accessible"}]}"

    • @krishnabishtube
      @krishnabishtube Місяць тому

      yes am also having the same error

    • @adamekk_ko
      @adamekk_ko Місяць тому

      do u know any other way to get the twitter data?

  • @prateekrustagi537
    @prateekrustagi537 5 місяців тому

    twikit.errors.Forbidden: status: 403, message: ""
    I am getting this error!

  • @MikeHarris-p1b
    @MikeHarris-p1b 4 місяці тому

    Hello,
    when I try to run everything up to and including the client.search_tweets command, I get the following error:
    RuntimeError: 'run_cell_async' needs a real async loop
    An initial search was not helpful.
    Do you have any insight on this error?
    Also, could you please tell me how to search for tweets within a certain time frame (date ranges)?
    Thank you!

  • @MikeHarris-p1b
    @MikeHarris-p1b 4 місяці тому

    Hello,
    when I try to run everything up to and including the client.search_tweets command, I get the following error:
    RuntimeError: 'run_cell_async' needs a real async loop
    An initial search was not helpful.
    Do you have any insight on this error?
    Also, could you please tell me how to search for tweets within a certain time frame (date ranges)?
    Thank you!