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

Поділитися
Вставка
  • Опубліковано 29 лис 2024

КОМЕНТАРІ • 124

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

    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 3 місяці тому

      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 3 місяці тому +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 3 місяці тому +1

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

    • @MaxMinExtremum
      @MaxMinExtremum 3 місяці тому +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 3 місяці тому

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

  • @RaulMercado
    @RaulMercado 15 днів тому +4

    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!

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

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

  • @拔
    @拔 4 місяці тому +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 4 місяці тому

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

    • @YT-xm2zl
      @YT-xm2zl 2 місяці тому +4

      Can u send the documentation

  • @stanleychukwuemeka8841
    @stanleychukwuemeka8841 4 місяці тому +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?

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

    You're a life saver

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

    You are an amazing tutor. Bless you

  • @codebyheart5067
    @codebyheart5067 4 місяці тому +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

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

    Keep it up man, appreciate the work

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

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

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

      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 2 місяці тому

      same error, what must we do?

    • @ramblingsofadegenerate1174
      @ramblingsofadegenerate1174 29 днів тому

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

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

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

    • @GermanSantos
      @GermanSantos 2 місяці тому +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.

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

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

    • @xxtseed
      @xxtseed 13 днів тому +1

      I just noticed, haha.

  • @mohsenshahi9750
    @mohsenshahi9750 28 днів тому +2

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

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

    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 Місяць тому +1

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

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

    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 3 місяці тому

      I have this problem

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

      same

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

      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 2 місяці тому

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

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

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

  • @farhanalhafizh5874
    @farhanalhafizh5874 Місяць тому +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?

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

    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  4 місяці тому +1

      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”)’

  • @SebastianAguilar-ec5ul
    @SebastianAguilar-ec5ul 25 днів тому

    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.

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

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

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

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

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

      i got the same

  • @wicherast
    @wicherast 13 днів тому

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

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

    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 2 місяці тому

      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!

  • @ramblingsofadegenerate1174
    @ramblingsofadegenerate1174 29 днів тому +1

    is this api still working

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

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

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

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

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

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

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

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

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

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

    • @aispectrum
      @aispectrum  4 місяці тому +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”

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

      @@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 4 місяці тому +3

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

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

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

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

    twikit 2.13 Can the blogger update the code?

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

    can you please provide the code , thank you

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

    Thank you sir

  • @giorgiopallucchini6578
    @giorgiopallucchini6578 16 днів тому

    Is it not safe for your twitter account?

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

    It doesn't work with me.

  • @dota2970
    @dota2970 2 місяці тому +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 😭

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

    im getting error!!! help me out please

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

    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 3 місяці тому

      Hello, did you find a solution for this?

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

      @@LolaErogs no I am still working on it

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

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

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

    awesome

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

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

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

      Agreed! Before it was way easier to get tweets 🥲

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

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

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

      Hello, have you been able to solve this?

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

      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 2 місяці тому

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

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

      @@GloryBenedict-qs5sf looool frantically looking for a solution

  • @sarahm8627
    @sarahm8627 4 місяці тому +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

  • @markblakey7444
    @markblakey7444 4 дні тому +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 23 години тому

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

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

    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 Місяць тому

    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 3 місяці тому

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

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

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

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

    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 2 місяці тому

    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!