Scrape Twitter with 5 Lines of Code

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.ย. 2024

ความคิดเห็น • 248

  • @ioannisavgeros167
    @ioannisavgeros167 10 หลายเดือนก่อน +34

    Unfortunately, does not work anymore after changes. Returns 404 constantly.

  • @robmulla
    @robmulla  ปีที่แล้ว +9

    Edit: It looks like this package is no longer working for some people (Thanks Elon) If you have issues here are some tips:
    From the SNScrape github page:
    ```
    If you discover an issue with snscrape, please report it at github.com/JustAnotherArchivist/snscrape/issues. If you use the CLI, please run snscrape with -vv and include the log output in the issue. If you use snscrape as a module, please enable debug-level logging using import logging; logging.basicConfig(level = logging.DEBUG) (before using snscrape at all) and include the log output in the issue.
    ```

  • @Kemmydai
    @Kemmydai ปีที่แล้ว +5

    Presently doing my MSc project and this video just pushed me forward so much!
    Thank youuuuu

    • @robmulla
      @robmulla  ปีที่แล้ว

      Really glad to hear that.

  • @mulberryJamz
    @mulberryJamz ปีที่แล้ว +10

    Hi Rob, I'm new to data science and I was wondering if you can make a video that shares the basics to webscraping from webpages. More specifically how to go about navigating and reading the parsed HTML texts of data to locate the strings we want like say content specific to a table or reviews on a webpages.
    Thanks for posting such easy to digest videos and sharing valuable tips to do things in a more efficient way!

  • @andygarcia6113
    @andygarcia6113 ปีที่แล้ว +17

    You make it look so easy. Amazing vid!

    • @robmulla
      @robmulla  ปีที่แล้ว

      Thank you! 😊 Hopefully you can put it to some good use.

  • @zoe-mv6ji
    @zoe-mv6ji ปีที่แล้ว +2

    I wish you were my lecturer/ tutor, I’m doing a conversion masters and the way you explain code is stopping me from having a breakdown 🤣🤣

    • @robmulla
      @robmulla  ปีที่แล้ว +1

      Ha! Thanks, I apprecaite that. I try to make things easy to follow, glad to hear you're learning from it!

    • @zoe-mv6ji
      @zoe-mv6ji ปีที่แล้ว

      @@robmulla you’re doing an amazing job at making it easy to follow. Thank you!

  • @stanleychukwuemeka8841
    @stanleychukwuemeka8841 2 หลายเดือนก่อน +1

    Is scraping millions of tweets still possible because i would like to build an AI model using the text data. Please if it's possible how can I go about it?

  • @gustavolabrador6192
    @gustavolabrador6192 7 หลายเดือนก่อน +3

    Hello, I wrote the code for the video, but I'm getting an error. It still runs as of this date due to the issue with the APIs that need to be paid for on Twitter.

  • @abdelbaseermohamed1396
    @abdelbaseermohamed1396 ปีที่แล้ว +2

    The code is no longer working; it reports a problem of tweets blocking. Could you please check and help solve this issue?

    • @ayomideonikoyi
      @ayomideonikoyi ปีที่แล้ว +1

      Yh noticed thusalso, something seems to be blocked.

  • @khouloudsafi1445
    @khouloudsafi1445 11 หลายเดือนก่อน +3

    Thank you very much for the video,,,
    SNScrape used to work for me before but now it shows blocked 404, after some research I found that twitter now is blocking scraping without login.....
    any idea how to solve the problem ?
    Many thanx for the efforts

    • @magdieladames7233
      @magdieladames7233 11 หลายเดือนก่อน +1

      Interesting, I was just going to start using this. 😢

  • @philipomelo
    @philipomelo ปีที่แล้ว +5

    Awesome. Simple and straight 👌

    • @robmulla
      @robmulla  ปีที่แล้ว

      Thanks for watching!

  • @tantomanontroppo8582
    @tantomanontroppo8582 ปีที่แล้ว +4

    hi rob, i think this api doesn't work anymore. i think twitter blocked it

  • @omondifellow3120
    @omondifellow3120 ปีที่แล้ว +3

    I'm geting 403 Forbidden error while trying to scrape tweets using the library. Does it means there is a restriction?

  • @JohnFallot
    @JohnFallot ปีที่แล้ว +1

    oh man, this is incredible and exactly what I was looking for 🤩 Let us know when you decide to launch a Patreon!

    • @robmulla
      @robmulla  ปีที่แล้ว +4

      Thanks man! No Patreon for now, just share with others who might also apprecaite it.

  • @iliecosminbiltan2639
    @iliecosminbiltan2639 ปีที่แล้ว +3

    HI, Rob. I don't understand why i have this error:
    Errors: blocked (403), blocked (403), blocked (403), blocked (403)
    that's when i call scraper.get_items()

    • @sohaib5086
      @sohaib5086 10 หลายเดือนก่อน

      same errror

  • @bishnudas8638
    @bishnudas8638 3 หลายเดือนก่อน +1

    Hi Rob - I tried but it is not working anymore.

  • @joaogollucci7877
    @joaogollucci7877 ปีที่แล้ว +1

    Amazing, will help me a lot with a project. Keep up whit the awesome content!!

    • @robmulla
      @robmulla  ปีที่แล้ว

      Great to hear! Thanks for commenting!

  • @AIvarogarciaa
    @AIvarogarciaa ปีที่แล้ว +2

    Hi guys, I have a problem with snscrape. The code works well but without any reason the process early stop at 188 tweets :/

  • @stellamukuhi5646
    @stellamukuhi5646 11 หลายเดือนก่อน +1

    This is awesome, nice and straight to the point!

  • @louloumattinson994
    @louloumattinson994 ปีที่แล้ว +4

    Hi Rob, I cannot seem to make it work, I am not sure if its something I am doing but it produces a 'Errors: blocked (404), blocked (404), blocked (404), blocked (404)' message and states 'failed, giving up', with a lot of links to twitter that show I don't have access. Do you have any suggestions? Thanks!

    • @MrChefMedz
      @MrChefMedz ปีที่แล้ว +2

      same issue

    • @yugpatel588
      @yugpatel588 7 หลายเดือนก่อน

      snscrape no longer works for twitter. Elon has changed the policies making it hard to scrape without using the official API.

  • @hemalatha_karuppusamy
    @hemalatha_karuppusamy ปีที่แล้ว +2

    Thanks for the knowledge sharing ....
    When i am trying the same i am getting the 404 error .. Can you help me with the error rectification..

  • @jaiswalrohan
    @jaiswalrohan ปีที่แล้ว +9

    ok people this aint working now dont waste your time here

  • @valerionetophdcandidate
    @valerionetophdcandidate ปีที่แล้ว +2

    with this twitter x update is not working anymore? I tried to run the "for tweet in..." and it did not work "Error retrieving ...."

    • @robmulla
      @robmulla  ปีที่แล้ว +1

      Yea, I think Elon broke it. :(

  • @CaribouDataScience
    @CaribouDataScience ปีที่แล้ว +2

    Everything works (in VS Code notebook) except the progress bar isn't displaying? It runs without error. Here is the code:
    n_tweets = 5000
    for i, tweet in tqdm(enumerate(scraper.get_items()),total=n_tweets):
    data = [
    tweet.date,
    tweet.id,
    tweet.content,
    tweet.user.username,
    tweet.likeCount,
    tweet.retweetCount,
    ]
    tweets.append(data)
    if i >n_tweets:
    break

    • @robmulla
      @robmulla  ปีที่แล้ว +1

      try importing the base tqdm instead of tqdm notebook:
      replace:
      from tqdm.notebook import tqdm
      with:
      from tqdm import tqdm

    • @CaribouDataScience
      @CaribouDataScience ปีที่แล้ว

      @@robmulla Thanks that did the trick!!!

  • @ananth4595
    @ananth4595 5 หลายเดือนก่อน +1

    the coding is easy but currently, it's not working. I tried many times 🤕

  • @huyfe1347
    @huyfe1347 ปีที่แล้ว +3

    Hi Rob, thank you a lot for this video. I have two questions:
    1. How to proceed if we want to scrap data on twitter with more queries like : #father; #mother; #baby; #foot etc.. Are we going to write one code for each query?
    2. Did you make video on scrapping Facebook, Instagram, Mastodon, Reddit, Telegram like you did for twitter?

    • @devngecu
      @devngecu ปีที่แล้ว

      use a for loop

  • @lumineersgaming4322
    @lumineersgaming4322 ปีที่แล้ว +1

    why the tweets extracted showing only half text? why not full text plz help

    • @robmulla
      @robmulla  ปีที่แล้ว

      Oh no, I haven't experienced that. Have you checked the github issues to see if others have the same problem? github.com/JustAnotherArchivist/snscrape/issues

  • @AminuteCrafts
    @AminuteCrafts ปีที่แล้ว

    Hi I am getting an error at line 6 for loop that Error retrieving , errors blocked 403 and request failed to giving up

  • @milesonme
    @milesonme ปีที่แล้ว +1

    Mate, how are u so good? What's your strategy? You code every single day? Or maybe you have many yrs of experience? What sort of courses or books do you study? How often do you read papers?
    I'm asking cz I learn so much jst thru recreating some of your projects and usually u have a very unique approach that I am used to, with very accurate results.
    I sure wanna be like you some day.
    Also could u keep the projects coming mate? I know there are tons of them on kaggle but it's quite frustrating to get stuck for us newbies a video explanation really helps.

    • @robmulla
      @robmulla  ปีที่แล้ว +3

      Thanks for the kind words. I really don’t think of myself as being better than any other person with the same amount of experience. I think the main thing I try to do is learn constantly and be patient. Things take time to learn. Check out my video about how to get started in ML for a more detailed breakdown of the skills to learn. Good luck.

  • @j.4880
    @j.4880 ปีที่แล้ว

    This is gold. 6 minutes and so much information given without any unnecessary fluff... I'm amazed. Thank you so much.

    • @ozgurbuldum6829
      @ozgurbuldum6829 11 หลายเดือนก่อน +6

      Could you make it work? I guess the most recent reply is yours, I get " blocked (404) " error with Python 3.10.

    • @mahlatsembooi3375
      @mahlatsembooi3375 11 หลายเดือนก่อน +1

      @@ozgurbuldum6829 yeah, blocked!

    • @mariodiaz2700
      @mariodiaz2700 11 หลายเดือนก่อน

      @@ozgurbuldum6829 it does not work anymore right?

  • @beethovennine
    @beethovennine ปีที่แล้ว +2

    Another nice vid! Good job!

    • @robmulla
      @robmulla  ปีที่แล้ว +1

      Glad you enjoyed! Share with a friend!

    • @beethovennine
      @beethovennine ปีที่แล้ว

      @@robmulla Always do!

  • @ketannanoti20
    @ketannanoti20 ปีที่แล้ว

    I tried but showing error after "for" statement, Error like : blocked (403), Error retrieving and message "Bad Authentication data" code 215 what I do now? Actually I have some twitter link and from that link I want like , view , RT count .. can you help me.. ?? How I code

  • @ahmadjibrilhemdi7639
    @ahmadjibrilhemdi7639 ปีที่แล้ว

    thanks! your progress bar is awesome!

    • @robmulla
      @robmulla  ปีที่แล้ว

      I appreciate it! I actually have a whole video on tqdm (the progress bar package) you should check out.

  • @7382932
    @7382932 ปีที่แล้ว +1

    Hi, thanks for the video super useful.
    I am quite new to all of this. What software are you using? And do you make those titles/write in each box separately?
    I am currently using PyCharm.

    • @rosiefish
      @rosiefish ปีที่แล้ว +2

      He's using Jupyter Notebook

  • @ishangoinyambo6523
    @ishangoinyambo6523 5 หลายเดือนก่อน +1

    is this still valid with x though?

  • @nikolakalev4914
    @nikolakalev4914 ปีที่แล้ว

    It seems like the snscrape module doesn't work anymore, due to returns an error. Do you have any information?

  • @ggggg-hr6en
    @ggggg-hr6en ปีที่แล้ว +1

    Thank you so much.
    I have one question.
    When I use snscrape, I can only use "tweet.content, count, date, id, index, outlinks, outlinkess, tcountlinks, tcountlinksss, url".
    But I want to explore like counts, image url and so on. Would you tell me how to scrape them?

    • @robmulla
      @robmulla  ปีที่แล้ว

      I believe likes are in there as well as the attached images. But you might want to check test it out. If snscrape doesn’t work you’ll need to get a Twitter api key.

  • @uzairmughal9383
    @uzairmughal9383 7 หลายเดือนก่อน

    Instead of capturing tweets based on some hashtag, can we pull tweets from specific accounts? Like I have 5 accounts for whom I want the tweets data for a given time frame, is it doable from this method?

  • @vtulin3097
    @vtulin3097 10 หลายเดือนก่อน

    Hello,Would you mind if ask if you can demonstrate how to use a crawler to capture twitter space cations. If the audio file is very long (more than ten or twenty hours), how to quickly capture it?

  • @tarunanand4308
    @tarunanand4308 ปีที่แล้ว

    Hey I am getting a 403 blocked error, I suppose the snscrape is going through API

  • @shahzadieman9415
    @shahzadieman9415 2 หลายเดือนก่อน +1

    Please create another video on this topic as these methods no longer work; they only scrape 100 tweets.

  • @CaribouDataScience
    @CaribouDataScience ปีที่แล้ว +1

    Good stuff! Why did use a list first (data) rather than a data.frame?

    • @robmulla
      @robmulla  ปีที่แล้ว +4

      Thanks! Appending to a list is much faster than appending to a dataframe so typically I prefer to just creat the dataframe after all the data is collected.

  • @tommyrieder4562
    @tommyrieder4562 ปีที่แล้ว +1

    When I run the code the progress bar turns red and becomes "1001/?". Did I make a mistake in the code or can I fix this?

    • @scarfface
      @scarfface ปีที่แล้ว +1

      I think it's because that loop will actually gather 1002 results with n_tweets set at 1000. I think Rob was just trying to get ~1000, not 1000 exactly.
      Reason: enumerate starts from 0, and the loop is only broken once that number goes ABOVE n_tweets (e.g. 1001), so you end up with an extra result at both ends.
      Quick Fix: break the loop when i > (n_tweets - 2)

    • @robmulla
      @robmulla  ปีที่แล้ว +1

      Good catch! This is a bug. It can be fixed by subtracting 2 from the number of tweets in the line before the break.

  • @nurulhanisahmuhammadhaasin885
    @nurulhanisahmuhammadhaasin885 ปีที่แล้ว +1

    hi, thank you for the tutorial. do you know how to set the data for specified location or range?

  • @CarlosReyes-ku6ub
    @CarlosReyes-ku6ub ปีที่แล้ว +1

    I'd really love to see you Forecasting Time Series using Transformers based Neural Nets.

    • @robmulla
      @robmulla  ปีที่แล้ว +1

      I plan on making a video like this at some point. Only downside is that in my experience these models don't perform well unless the data is huge.

    • @CarlosReyes-ku6ub
      @CarlosReyes-ku6ub ปีที่แล้ว +1

      @@robmulla You're right, but given the versatility of Transformers Architecture and the actual importance on the State of the Art it's worthy to know it, I personally haven't found good materials and since your videos are awesome I'd very much like to see it.

  • @yunes7305
    @yunes7305 ปีที่แล้ว +1

    Hi Rob! How much time it takes per 100k tweet? Just to compare with my scraper built in another language which takes approximately 10 to 15min to scape each 100k tweets.

    • @robmulla
      @robmulla  ปีที่แล้ว

      I think if you watch the end of the video the progress bar shows 35 tweets per second. So like 1 hour for 100k tweets?

    • @skez4774
      @skez4774 6 หลายเดือนก่อน

      Is your method still working today ?

  • @rishisharma6302
    @rishisharma6302 11 หลายเดือนก่อน +1

    Can i use this same code in vscode

  • @DarthKidd
    @DarthKidd ปีที่แล้ว +2

    Hi Rob. Thanks for the video.
    Did twitter update their security? Using your exact code from the first 3 minutes of the video, I keep getting an error retrieving api requests. Any tips on how to get past that?

    • @eve9587
      @eve9587 ปีที่แล้ว

      Sameee. Did you work around it?

    • @DarthKidd
      @DarthKidd ปีที่แล้ว

      @@eve9587 I did not unfortunately. What about you?

    • @eve9587
      @eve9587 ปีที่แล้ว +1

      Dude use top=True
      It works now

    • @clintongomez
      @clintongomez ปีที่แล้ว +1

      @@eve9587 Hi, I am having the same problem with snscrape recently. I am quite beginner on this. Can you explain where to apply top=true? Thanks in advance.

    • @robmulla
      @robmulla  ปีที่แล้ว

      Looks to be an issue everyone is experiencing. You can follow the github issues here and they may update. Hopefully just a temporary issue...
      github.com/JustAnotherArchivist/snscrape/issues

  • @CaribouDataScience
    @CaribouDataScience ปีที่แล้ว +1

    What is the mark after the "for i ,"

    • @scarfface
      @scarfface ปีที่แล้ว +2

      The comma after the "i" is to separate out the two things enumerate returns (index, value) in to the index "i" and value "tweet".
      Does that make sense?

    • @robmulla
      @robmulla  ปีที่แล้ว

      What Tim said! Thanks Tim!

  • @haileyjoseph7522
    @haileyjoseph7522 ปีที่แล้ว +2

    May I ask if I want to scrape from one specific user? How can I do that?

    • @robmulla
      @robmulla  ปีที่แล้ว +6

      Great question. You can add any query search terms like you would in the twitter search bar. Here is a cheat sheet: media.sproutsocial.com/uploads/2016/02/Twitter-Search-Operators-Cheatsheet-1.pdf
      So to search a specific user you should be able to do something like "from:Rob_Mulla".
      Hope that helps.

    • @haileyjoseph7522
      @haileyjoseph7522 ปีที่แล้ว +1

      @@robmulla Thanks for answering me! I'll definitely try that method 😁

  • @sonnix31
    @sonnix31 ปีที่แล้ว +1

    Sir, do you have a chat group where people ask questions? I followed your flight EDA, do you think predictions could be done with random forest ? Do you have something about this? (newbie here) . Thanks. BTW i like your videos.

    • @robmulla
      @robmulla  ปีที่แล้ว

      Yes I do! Join the discord: discord.gg/HZszek7DQc

  • @CaribouDataScience
    @CaribouDataScience ปีที่แล้ว +1

    What would be helpful for me would be a video on how to connect Python to a SQL Server database.!!

    • @robmulla
      @robmulla  ปีที่แล้ว +1

      It's really easy with pandas. pd.read_sql() - you just need to create the connection object which depends on your database type.

  • @behdad0979
    @behdad0979 ปีที่แล้ว +1

    Does Twitter block you if create a bot with and get tweets every day?

    • @robmulla
      @robmulla  ปีที่แล้ว

      I’m not sure. Things are changing every day at Twitter. This package has been relatively unstable lately so you might want to check out their GitHub (linked in the description)

  • @aidanheffernan652
    @aidanheffernan652 ปีที่แล้ว +1

    This with tweepy makes for a very interesting reposting bot

    • @robmulla
      @robmulla  ปีที่แล้ว +1

      Interesting idea.

  • @amiinofficial6272
    @amiinofficial6272 6 หลายเดือนก่อน

    how can i scrape specific tweets? pls answer me it is very important .

  • @marioaguilar8735
    @marioaguilar8735 ปีที่แล้ว

    How can I solve the 404 request error that I get when looping through the scraper object?
    Any idea?

    • @robmulla
      @robmulla  ปีที่แล้ว +1

      I think they’ve blocked it unfortunately

  • @user-dy9yo4yq9s
    @user-dy9yo4yq9s 11 หลายเดือนก่อน +2

    My code is not working

  • @Technomic-o
    @Technomic-o ปีที่แล้ว +1

    Amazing man

    • @robmulla
      @robmulla  ปีที่แล้ว

      Thanks 🔥

  • @jp-sc5du
    @jp-sc5du ปีที่แล้ว

    How do I get a specific tweet and retrieve the quotes and replies?

  • @murtazahussain8485
    @murtazahussain8485 ปีที่แล้ว +1

    The request was blocked by the twitter.

  • @andyyang8876
    @andyyang8876 ปีที่แล้ว +1

    is there a way to pull say, latest 50 tweets from a specific user?

    • @robmulla
      @robmulla  ปีที่แล้ว

      Yes! I mentioned in a different response but you can use twitter's query to filter to specific users or dates. Check this cheat sheet:
      media.sproutsocial.com/uploads/2016/02/Twitter-Search-Operators-Cheatsheet-1.pdf
      So do something like "from:Rob_Mulla"... And setting your loop to only go through 50 would get you the latest tweets.

  • @ernestcholopray3545
    @ernestcholopray3545 ปีที่แล้ว +1

    Excellent Rob. Would you happen to have tutorial sessions? if so kindly link me to it

    • @robmulla
      @robmulla  ปีที่แล้ว

      Yes! Subscribe and hit the bell icon and you’ll be notified when I go live. Also follow me on twitch.

  • @magicbrushes0
    @magicbrushes0 10 หลายเดือนก่อน

    it's not working for me I'm getting and error in retrieving the data 🤕🤕

  • @ruirossi6241
    @ruirossi6241 ปีที่แล้ว +1

    very nice. Thanks

    • @robmulla
      @robmulla  ปีที่แล้ว

      Most welcome

  • @techyoungster2713
    @techyoungster2713 10 หลายเดือนก่อน

    It is not working now days.
    Do you have any other alternatives?

  • @mmfr3
    @mmfr3 ปีที่แล้ว

    Does it still work with new API packages?

  • @kanaparthyjaswanth9484
    @kanaparthyjaswanth9484 ปีที่แล้ว

    The data seems to be truncated. could anyone please tell me how to deal with that ?

  • @impac143
    @impac143 ปีที่แล้ว +1

    Is it possible to scrape profile information and followers list? thank you

    • @robmulla
      @robmulla  ปีที่แล้ว

      That’s a great question. There are ways to do this but I don’t believe snscrape can do it. You might need to apply for the Twitter api and use something like tweepy

  • @vedantpanchal2291
    @vedantpanchal2291 4 หลายเดือนก่อน

    big headstart in a project

    • @josephdickson5082
      @josephdickson5082 3 หลายเดือนก่อน

      does it still work? i doubt that. Was getting a 404 and 429 status codes last time i tried

  • @hangyuli3328
    @hangyuli3328 ปีที่แล้ว +1

    Sir, is it legal to scrape data on twitter without using twitter api now? I heard twitter shut down their free api.

    • @robmulla
      @robmulla  ปีที่แล้ว

      I don’t know. I’m not a lawyer but you should be ok.

    • @hangyuli3328
      @hangyuli3328 ปีที่แล้ว

      @@robmulla thank you

  • @rishavbhardwaj8044
    @rishavbhardwaj8044 ปีที่แล้ว

    Hi, just wanted to ask, we need twitter API access to do this scraping, right? Cause when I run the same code, it sends a request to twitter API website and then an error is displayed.

    • @khadijadar3156
      @khadijadar3156 ปีที่แล้ว +1

      did you find any solution

    • @rishavbhardwaj8044
      @rishavbhardwaj8044 ปีที่แล้ว

      @@khadijadar3156 yes, I can scrape tweets now. It was a very simple code.

    • @TemporaryForstudy
      @TemporaryForstudy ปีที่แล้ว +1

      @@rishavbhardwaj8044 can you tell me how you fixed that?

    • @jaiswalrohan
      @jaiswalrohan ปีที่แล้ว

      tell us how!

    • @rishavbhardwaj8044
      @rishavbhardwaj8044 ปีที่แล้ว

      @@TemporaryForstudy
      I was using this code, but as of 2 days ago, it stopped working:
      import snscrape.modules.twitter as sntwitter
      import pandas as pd
      limit = 1000
      tweets_list = []
      for tweet in sntwitter.TwitterSearchScraper("NestleIndia").get_items():
      if len(tweets_list) == limit:
      break
      else:
      tweets_list.append([tweet.date, tweet.content, tweet.user.username, tweet.user.displayname,
      tweet.user.description, tweet.replyCount, tweet.retweetCount, tweet.likeCount,
      tweet.lang])
      df = pd.DataFrame(tweets_list, columns=['Date', 'Content', 'Username', 'Description', 'Language'])
      # Save the DataFrame to a CSV file
      df.to_csv('tweets_nestle.csv', index=False)
      print("Data saved to tweets.csv")

  • @ahmedshalaby185
    @ahmedshalaby185 ปีที่แล้ว +1

    Hello, Thanks for the nice tutorial, I just wonder if there is a way to scrape only tweets instead of reply and tweets

    • @robmulla
      @robmulla  ปีที่แล้ว

      I’m not sure but it should be possible in the query method.

  • @milesonme
    @milesonme ปีที่แล้ว +1

    Can u limit the tweets to only tweets in a certain language say English?

    • @robmulla
      @robmulla  ปีที่แล้ว

      Yes, use something like "lang:en" in the query. Check out this cheatsheet on twitter queries. media.sproutsocial.com/uploads/2016/02/Twitter-Search-Operators-Cheatsheet-1.pdf

  • @IshaqKhan010
    @IshaqKhan010 ปีที่แล้ว +1

    not working anymore

  • @tonymok7752
    @tonymok7752 ปีที่แล้ว +1

    Why your jupyter notebook interface looks different than mine?

    • @robmulla
      @robmulla  ปีที่แล้ว

      I got into detail about my jupyter setup towards the end of this video: th-cam.com/video/5pf0_bpNbkw/w-d-xo.html - Hope that helps. In short: jupyterlab with solarized dark theme.

    • @tonymok7752
      @tonymok7752 ปีที่แล้ว

      @@robmulla Thanks. Imma do it with my setup

  • @user-jf3rf7jy9d
    @user-jf3rf7jy9d ปีที่แล้ว

    if I have the tweet's url or ID, can I get its content?

  • @Laufeyson_
    @Laufeyson_ ปีที่แล้ว

    Thanks for the awesome video, are you planning on doing NLP project?

    • @robmulla
      @robmulla  ปีที่แล้ว

      Thanks for watching! Have you seen my video on sentiment analysis? That has some NLP th-cam.com/video/QpzMWQvxXWk/w-d-xo.html

  • @elu1
    @elu1 ปีที่แล้ว

    Very effective teaching! could you have a video for exploring data scrapped from twitter?

    • @robmulla
      @robmulla  ปีที่แล้ว +1

      Thanks! I'd suggest checking out one of my live streams!

  • @FRANKWHITE1996
    @FRANKWHITE1996 ปีที่แล้ว +1

    Just subscribed ❤

    • @robmulla
      @robmulla  ปีที่แล้ว

      Thanks for subbing. Hope you like the videos.

  • @Ketan3101
    @Ketan3101 ปีที่แล้ว +1

    How can I get follower count of different users using this??

    • @robmulla
      @robmulla  ปีที่แล้ว

      I don’t think so. The Twitter api should give this easy enough though.

  • @Pscytlk
    @Pscytlk ปีที่แล้ว +1

    how do I get only people account and also their follower and following count?

    • @robmulla
      @robmulla  ปีที่แล้ว

      Not sure if you can do this with snscrape, but with tweepy you could.

    • @Pscytlk
      @Pscytlk ปีที่แล้ว

      ​@@robmulla thank you sir!

  • @AbhishekKumar-wf9ey
    @AbhishekKumar-wf9ey ปีที่แล้ว +2

    please help with the 403 error if you can.

  • @a.d.a.k2143
    @a.d.a.k2143 ปีที่แล้ว

    how do i scrape the english tweets alone?

  • @waleedmandourlecturer
    @waleedmandourlecturer ปีที่แล้ว +1

    Thank you for sharing this amazing tool and wonderful tutorial.
    Q: How can I retrieve all replies to a selection of tweets?

    • @robmulla
      @robmulla  ปีที่แล้ว

      Thanks. I don’t know if that’s possible with snscrape. You might need the official Twitter api.

  • @EmailXpertise
    @EmailXpertise ปีที่แล้ว +1

    what software do you use for write the code ?

    • @OfficialB23
      @OfficialB23 ปีที่แล้ว +2

      it's look like jupyterlab

    • @robmulla
      @robmulla  ปีที่แล้ว

      Yes, jupyterlab - I have a whole video about it!

  • @Azouni01
    @Azouni01 ปีที่แล้ว

    Thank you for this wonderful tutorial.
    Q: How can I retrieve infos like tweet content , username ... ,for a specific tweet using its id or url?

  • @mohamed-muneer
    @mohamed-muneer ปีที่แล้ว

    I have seen that you use jupyter lab in dark mode, how to activate dark mode?

    • @robmulla
      @robmulla  ปีที่แล้ว

      Solarized dark theme! Check out my tutorial video where I explain how: th-cam.com/video/5pf0_bpNbkw/w-d-xo.html

  • @muchammadfahd-a1985
    @muchammadfahd-a1985 ปีที่แล้ว +1

    i've try now but sntwitter cannot get any items

    • @robmulla
      @robmulla  ปีที่แล้ว

      Oh no. Did Elon shut it down?!

  • @muchammadfahd-a1985
    @muchammadfahd-a1985 ปีที่แล้ว +1

    i have an error "Unable to find guest token"

    • @robmulla
      @robmulla  ปีที่แล้ว

      I'm not sure why that would be, works for me! Let me know if you get it working.

    • @aidanheffernan652
      @aidanheffernan652 ปีที่แล้ว

      came across this error you need to initialize the scraper object after before every run of .get_items()

  • @aliathar891
    @aliathar891 ปีที่แล้ว +1

    can we access tweets older than 7 days?

    • @robmulla
      @robmulla  ปีที่แล้ว

      At least you used to be able to

  • @siddharthmahendran8186
    @siddharthmahendran8186 ปีที่แล้ว +1

    Will I be able to scrape data using google collab?

  • @huyfe1347
    @huyfe1347 ปีที่แล้ว

    how can we install snscrape?

  • @brycesoto6818
    @brycesoto6818 ปีที่แล้ว +31

    Unfortunately, this is now dead 😒

    • @soumilyade1057
      @soumilyade1057 ปีที่แล้ว +2

      clone directly from git

    • @mousaha643
      @mousaha643 ปีที่แล้ว +1

      @@soumilyade1057 can you give more details on this, how to do it now

    • @bergamot17
      @bergamot17 ปีที่แล้ว +1

      I tried too and it just gets blocked now. Shame.

    • @soumilyade1057
      @soumilyade1057 ปีที่แล้ว

      @@mousaha643 there's no avenue left unblocked....! Ar kora jabenaa

    • @ragcage
      @ragcage ปีที่แล้ว

      ​@soumilyade1057 Are you saying there are now ways left to scrape twitter?

  • @manarma7536
    @manarma7536 8 หลายเดือนก่อน +1

    it is not working anymore !

  • @TheFJudge-yc1ts
    @TheFJudge-yc1ts ปีที่แล้ว

    an error 403 from twitter api occurs
    at get items

  • @patrickonodje1428
    @patrickonodje1428 ปีที่แล้ว +1

    Awesome

    • @robmulla
      @robmulla  ปีที่แล้ว +1

      Thanks Patrick!

  • @farhadnikhashemi8681
    @farhadnikhashemi8681 2 หลายเดือนก่อน

    Your shared videos are fantastic, Rob. Well done.
    By the way, I applied the above, but I was unable to scrape the data, assuming that Twitter does not allow escape without API. If anyone has done this successfully, please advise.

    • @laidkahloul322
      @laidkahloul322 หลายเดือนก่อน

      my case too. I think that these methods do no more work !

  • @startupschool4895
    @startupschool4895 ปีที่แล้ว +1

    What shall we do for reddit,
    Make one analysing WallStreetBets.

    • @robmulla
      @robmulla  ปีที่แล้ว +1

      Great idea. Maybe I’ll make another video.

  • @WetBet
    @WetBet ปีที่แล้ว

    What is the thing you’re using to run the script? I know nothing about coding so I’m confused

    • @amasoharnold4762
      @amasoharnold4762 ปีที่แล้ว

      Juypter notebook just google it and you’ll find it … or search anaconda
      It’s not the snake I promise…

  • @danielhall6759
    @danielhall6759 ปีที่แล้ว

    Does anyone know if this method still works today?