Build A Twitter Bot With Python That Gets You Followers

Поделиться
HTML-код
  • Опубликовано: 31 янв 2025
  • НаукаНаука

Комментарии • 1 тыс.

  • @marc.gauthier
    @marc.gauthier 5 лет назад +23

    As a QA automation developer, I would have changed a couple of things. The time sleep will make you wait for nothing and get into synchronization issues. Instead, wait for a specific element to appear in the DOM before processing further.
    For the Infinity scrolling, instead of injecting JavaScript, you can do it in a pythonic way by checking for the line_height of the document. This way you can control your scroll and know you are at the true bottom of the document. So for each scroll compare line_height with new_height and loop it.
    Aside of that, great tutorial and basics!

    • @MohsinCanadian
      @MohsinCanadian 3 года назад

      How would you code this? I want to implement what you're suggesting but don't know how (noob)

  • @nktslp3650
    @nktslp3650 5 лет назад +5

    Hey Ed! I'm new to python and everything you made is helping me SO MUCH. One of the biggest nightmare as a beginner is to have all the tools but not the balls nor the knownledge to do it. Everything seems easy or doable with you. Thanks again!

  • @Ownage4lif31
    @Ownage4lif31 5 лет назад +213

    Instead of using static sleeps, you can use the functions selenium provides that checks for the presence of an element. As a result, it will be compatible with all Internet speeds.

    • @edilgin
      @edilgin 5 лет назад +2

      what is it called?

    • @Ownage4lif31
      @Ownage4lif31 5 лет назад +8

      edilgin I don't do python but it's somewhat the same.
      driver. wait(condition)
      Import this
      from selenium.webdriver.support import expected_conditions as ec
      Then do like ec.visibility_of_element_located(element) as the condition.
      Just google the function for a full on example. Pretty straightforward

    • @izzyanalytics4145
      @izzyanalytics4145 5 лет назад

      @@Ownage4lif31 on Python I'm showing webdriver.implicity_wait() ... same thing?

    • @piyush7119
      @piyush7119 5 лет назад +2

      Instead he should have used Twitter API with tweepy

    • @VerifyBot
      @VerifyBot 5 лет назад

      @@piyush7119 but it's not cool

  • @jeremygrifski
    @jeremygrifski 5 лет назад +2

    Really great stuff! Just a word of warning: Twitter prohibits automated likes.
    I saw this video and decided to try to tackle this myself using their API. After setting up a Developer account, I stumbled upon the automation rules which state: "You may not like Tweets in an automated manner.
    " As a result, something like this may get you banned.
    Really cool regardless! Awesome video and nice work.

    • @julianwidjaja4896
      @julianwidjaja4896 5 лет назад

      Just add random number interval

    • @jeremygrifski
      @jeremygrifski 5 лет назад

      @@julianwidjaja4896 I don't think that would be enough to fool Twitter's bot stomping algorithms haha

  • @YuriRadavchuk
    @YuriRadavchuk 5 лет назад +4

    Thanks for this tut, really helpful. It's great that you keep some place for refactoring to helping our minds think about it. The simplest approach for not checking login and password fields would be opening incognito window.

  • @manu_makaveli
    @manu_makaveli 5 лет назад +16

    It really works. It's the first time I do something like this and I've done it. Thanks buddy, you're the best.

  • @rajatgupta217
    @rajatgupta217 4 года назад +4

    I think this is one of the best most underrated dev YT channel.

  • @giorgikochiashvili6947
    @giorgikochiashvili6947 5 лет назад +1

    make sure you handle already liked tweets. The problem is that after the scroll if the already liked tweet is still "visible" then clicking on it will unlike it. You probably need to maintain some kind of a data structure where you track already liked tweets.
    Great tutorial!

    • @catte_6376
      @catte_6376 5 лет назад

      And the button will probably have some extra class if it's liked so you can check for that instead of storing every tweet

  • @cirlorm5337
    @cirlorm5337 5 лет назад +3

    Hi Ed, you are my favourite developer on RUclips,
    You help me learn JavaScript 5 months ago with your weather app tutorial
    And now I'm learning python.
    Thanks Ed.
    Dimitri Marco 💪

  • @tionut4228
    @tionut4228 5 лет назад +1

    I find your videos really enjoyable.It's probably not only thanks to your knowledge but your personality aswell. Keep it up, Ed!

  • @kevinurielfonseca
    @kevinurielfonseca 5 лет назад +145

    I was more impressed by the magic trick lol. Cool video, I just subscribed!.

    • @abishekrajpandey8691
      @abishekrajpandey8691 5 лет назад +3

      It just has a hole like key ring..nothing amusing

    • @matzhilven1052
      @matzhilven1052 5 лет назад

      @@abishekrajpandey8691 Wow! I didn't know!

    • @markmuthii
      @markmuthii 4 года назад

      Pausing at 1:23 will reveal the trick 😁

    • @wussonchan
      @wussonchan 4 года назад

      @@markmuthii Oh yeah I see the hole at the top XD

    • @qpdjjsjs3834
      @qpdjjsjs3834 4 года назад

      @@abishekrajpandey8691 whole*

  • @yashponam1055
    @yashponam1055 5 лет назад +1

    Just watched your first video, excellent explaination but mainly you are relating python with real world application thanks buddy keep up waiting for more videos!!

  • @swinterz3539
    @swinterz3539 5 лет назад +67

    Pause at 1:23 and you can see the missing section in the left loop. Rip magic😢

  • @mastercode7851
    @mastercode7851 5 лет назад +1

    oh i think god loves me cuz the whole last week i was exploring about bot's and how to create one with python and all tutorial was old and i found one posted by john g fisher it was instagram bot but unfortunly instagram stopped the automation thing so people who was using bots got blocked from follownig or liking or commenting so yeah and you just dropped this fresh one , thanks alot man
    edit after an hour: finished and it works perfectly and i used Chrome insted of firefox , thanks ed , please make more like this

  • @dilshanwije
    @dilshanwije 5 лет назад +12

    Wow amazing..i am a math teacher and u are the best explaining conceptionaly.i only got uses of classes,functions from u.thanks ..from sri lanaka

  • @OivindKolloen
    @OivindKolloen 5 лет назад

    Indentation matters, look at the for construction from line 35-41. This lives inside the "for i in range(1,3)" construction on line 29, meaning this code will be running three times.
    Un-indent this block (lines 35-41) one level and this code will only run once, when you have scrolled down three times.
    It is one of the love/hate aspects of Python, it forces you to indent your code but it is also really easy to make such mistakes.
    I really enjoy your tutorials, clear and to the point :-)

  • @aashayamballi
    @aashayamballi 5 лет назад +4

    Ahhh! another day, another great video. Thank you :)

  • @zayn3608
    @zayn3608 4 года назад

    Dam fab man...So impressed by the simplicity of code and your humbleness

  • @FreedomForKashmir
    @FreedomForKashmir 5 лет назад +8

    you are great ,,, I appreciate your videos a lot because you implement some real world Ideas rather than just teaching some basic stuff regarding how to code and syntax regarding things .....
    Huge Love and respect from Pakistan ,.....

  • @lowkeygaming4716
    @lowkeygaming4716 5 лет назад +1

    Thanks. Will definitely try this. Hoping to see more automation vids with Python in the future.

  • @bennykimanibk
    @bennykimanibk 5 лет назад +6

    wow! This is just more than perfect, you are just on point

  • @Namklaww
    @Namklaww 5 лет назад

    Thanks for your videos! You're already among my favorite dev channels, keep it up! :)

  • @HudZah
    @HudZah 5 лет назад +12

    This bot won't work anymore with the new twitter update. They have changed it so that each "tweet's" class name is now a random set of characters

    • @troindx
      @troindx 5 лет назад +1

      That's exactly what I found out.

    • @patrykgunwo5145
      @patrykgunwo5145 5 лет назад +1

      Is there a way around it?

    • @spiritcore1
      @spiritcore1 5 лет назад

      Same as facebook did so AdBlock can't identify the ads anymore.

    • @HudZah
      @HudZah 5 лет назад +1

      @@patrykgunwo5145 You can try using "xpaths" in the selenium bot, not tried it yet but I am pretty sure it would work

    • @chidoziennachor7201
      @chidoziennachor7201 5 лет назад

      Anyone found a solution to this?

  • @delamawuli6158
    @delamawuli6158 5 лет назад +1

    Hi, I'm fascinated by your sense of humor. Great tuts... Please keep it coming.

    • @abdullahraihanbhuiyan2346
      @abdullahraihanbhuiyan2346 5 лет назад

      Is this workable now? I think twitter has a new update which won't let this bot work.

  • @devashish_manna
    @devashish_manna 5 лет назад +3

    People who are having trouble with not finding perma-link.
    I suggest using xpath for automatically clicking on likes rather than fetching tweets then fetching links then liking.

    • @hatsuyumi
      @hatsuyumi 5 лет назад +1

      Can you be more specific, please?? @Devashish Manna

    • @shreyankshetty01
      @shreyankshetty01 5 лет назад

      Can you specify the xpath please ?

  • @dilChahta_hai
    @dilChahta_hai 5 лет назад +1

    watching another video of yours and this bumps in....cheers.

  • @benzigarjs8607
    @benzigarjs8607 5 лет назад +45

    The first tweet you seen is from Tamil Nadu, India 😍😍😍😍😍

  • @don-t_noodles
    @don-t_noodles 5 лет назад

    Dude you are awesome, not everyday we see people making stuffs using code. Thanks a lot for the video. Also if you are not too busy, keep it up. ☺

  • @arifbasri4950
    @arifbasri4950 5 лет назад +4

    I think it does not work with new twitter.. I try to find and just found tag and then I don't know...why there is no link/path to tweet status at all? Why does it change so fast? I'm sorry I not really expert in web tech..

    • @Dn0de
      @Dn0de 4 года назад

      there is a link but the class actually messy

    • @rahulpantheon
      @rahulpantheon 4 года назад

      hi I need a bot developer. WhatsApp me +919785732768

  • @dhananjaykansal8097
    @dhananjaykansal8097 5 лет назад

    Just lovely! I'm amazed! Thank you sir. Hope to see more from you

  • @rohuh9365
    @rohuh9365 5 лет назад +14

    lmao one of my fav channels currently
    There's knowledge & humour perfect

  • @jishnupramod2130
    @jishnupramod2130 5 лет назад +1

    I think this is outdated , considering the fact that the tutorial doesn't serve its purpose as twitter has changed the html and css... But to learn a lot of python stuff and as an introduction to selenium module, this is really helpful !

    • @samds7789
      @samds7789 5 лет назад +1

      It is really good for understanding the basics, as for Twitter or any big websites they would do anything to eliminate chances of bot manipulation so its obvious that they will do changes (or sometimes just UI changes), anyhow with this vid you can still manage to the same with just a bit of extra imagination

    • @jishnupramod2130
      @jishnupramod2130 5 лет назад +1

      @@samds7789 And I did it !

    • @MsomeleShow
      @MsomeleShow 5 лет назад

      @@jishnupramod2130 how did you get to like posts? im stuck there :C

  • @rrqwee121e1asd
    @rrqwee121e1asd 5 лет назад +3

    instead of using selenium (which is slow and is just a bad idea xd) just use requests and parse the pages.
    If you really want to keep selenium then use chrome (it is way faster) and use --headless

    • @topsl69
      @topsl69 5 лет назад

      There is a library called tweepy which is just perfect for things like that

    • @rrqwee121e1asd
      @rrqwee121e1asd 5 лет назад

      @@topsl69 Yeah but it is specific for Twitter, if you want to make a powerful "web bot" Requests is the best way to go

    • @batyr1166
      @batyr1166 5 лет назад

      How to parse dynamic page without selenium?

  • @katelibra
    @katelibra 5 лет назад +1

    Frist time i watched your whole video and i love it ... simple and clean ... keep it up. ❤️❤️❤️❤️

  • @shagyy7449
    @shagyy7449 5 лет назад +61

    Can u do for instagram similar pls? Btw u helped me a lot for javascript :)

    • @freakinmonkey85
      @freakinmonkey85 5 лет назад +13

      SHAGYY Instagram WILLban you, so be careful. As I recall, if a user likes more than 200post per day they get flagged

    • @mastercode7851
      @mastercode7851 5 лет назад +6

      instagram stopped automation with last update so bot wont work you will instantly get blocked

    • @elbekkhaitov683
      @elbekkhaitov683 5 лет назад +8

      @@freakinmonkey85 can do for loop i < 100

    • @mohammedalzamil7191
      @mohammedalzamil7191 4 года назад

      i made one

    • @lenin700
      @lenin700 4 года назад

      @@mohammedalzamil7191 let me see

  • @abhijitdixit1589
    @abhijitdixit1589 5 лет назад

    Subscribed. Really loving your python project series.

  • @AnonymouseNO.1
    @AnonymouseNO.1 5 лет назад +7

    Ed, bro can you help me? I try make fb bot but after 2-3login on my account i get verification alert and i have to guess users etc so what do u recommend to use as proxy using nodejs and phantomjs/others packages. Please god help

  • @danieldragojevic3016
    @danieldragojevic3016 5 лет назад +2

    Pretty sure there is a much faster method than making a bot. I would personally use GET request to get html code. Then parse the code. Then use POST request to like a post. Pretty sure it would work at least 10 times faster.

    • @asish-5848
      @asish-5848 5 лет назад

      can you describe me how it works ?..I am a beginner

    • @danieldragojevic3016
      @danieldragojevic3016 5 лет назад +1

      @@asish-5848 first of all, I use C# but I am pretty sure Python has httpclient library as well. Make sure you know the basics of your programming language so you can make your own algorithms. After that make sure you know html because you will be parsing the html code. Than start googling how to retreive html code from a website and learn how to send GET and POST requests to a website. You use GET request to get html code from a website. You put it in a string form and then parse the info you need (you need html knowledge for that). Next, you want to send POST requests to website based on info you got from parsing the html code. POST request is used for filling text boxes, pressing buttond, etc. You will need POST request to fill in your name and password, for searching tweets and for liking them. I haven't done it before but theory it should work. If you are a beginner, I wouldn't suggest doing it this way because you may face some security protocols which you would need to find a way how to bypass them.

    • @asish-5848
      @asish-5848 5 лет назад

      @@danieldragojevic3016 ok...i got 20-30% ...rest i will try... if you try it in future than do ping me !

  • @vishwanath-ts
    @vishwanath-ts 5 лет назад +14

    I'm stuck here 18:09 can anyone help
    I'm not able to find data permalink

  • @historymobile6210
    @historymobile6210 5 лет назад +1

    +1 subscriber. This is the programmer I've been looking for a long time. Good job and keep it up!

  • @shannusss119
    @shannusss119 5 лет назад +11

    it is showing error while running.
    the error is " cannot import name 'keys' from 'selenium.webdriver.common.keys' " can you help me with this

    • @lionelmouendou3057
      @lionelmouendou3057 5 лет назад +5

      Hey, here is the solution write the name with capital "K" after import seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html

    • @acoderjones2066
      @acoderjones2066 5 лет назад +1

      @@lionelmouendou3057 Thanks a lot for posting!

    • @utsavprabhakar5072
      @utsavprabhakar5072 5 лет назад +1

      @@lionelmouendou3057 Tahnks mate!

    • @NOBODYUSEFULL
      @NOBODYUSEFULL 5 лет назад +1

      @@lionelmouendou3057 Thanks your answer helped me a lot

    • @darwinnunez5793
      @darwinnunez5793 4 года назад

      @@lionelmouendou3057 it still says ModuleNotFoundError no module named 'selenium.webdriver.common

  • @uncovertech-hindi3240
    @uncovertech-hindi3240 5 лет назад +2

    Dude just got some hopes to get back into programming. Thank

  • @vishwanath-ts
    @vishwanath-ts 5 лет назад +3

    You're awesome bro, love from India 🇮🇳

  • @TheKenyanSoftwareEngineer
    @TheKenyanSoftwareEngineer 4 года назад +1

    U.must be a very happy man..many of ur videos u laugh alot which is good

  • @razibhatti5293
    @razibhatti5293 5 лет назад +6

    Whenever I try to do user.clear(), it shows an error saying nonInteractableElement. Anybody else facing it and how to resolve?

  • @chazdawg4340
    @chazdawg4340 5 лет назад +1

    I used this before to automatically log in to my Instagram. Selenium is a pretty useful tool and I’m excited to try this out with a twitter bot!

    • @edilgin
      @edilgin 5 лет назад

      same :D after i saw this i automated my ig account entrance

  • @juanjure2639
    @juanjure2639 5 лет назад +3

    Great video!!!, but i can not find the link of the tweets, in fact is the class what i can't find ('tweet' and 'data-permanent-link'). Suggestions???

    • @youtubenewsfeed5427
      @youtubenewsfeed5427 5 лет назад +2

      I had the same problem and it took me days to find a working solution. I asked a question here and no one helped. To find the tweets, I had to use find_elements_by_xpath instead of find_elements_by_class_name. So that looked like this: tweets = bot.find_elements_by_xpath("//*[contains(@class,'css-1dbjc4n r-18u37iz r-thb0q2')]") I have no idea why I had to use xpath but no one will answer me. Then to find the links in the tweets I did this: links = []
      for tweet in tweets:
      elements = tweet.find_elements_by_tag_name("a")
      for elem in elements:
      links.append(elem.get_attribute("href"))
      For some reason, finding elements by class name doesn't work. Also, I don't know if this makes a difference but instead of using Firefox, I used Chrome.

    • @youtubenewsfeed5427
      @youtubenewsfeed5427 5 лет назад +1

      Still have an issue with the code. The Chrome browser is opening the wrong urls. The url is some how entered wrong. For example: twitter.comhttps//twitter.com/hashtag/PositiveVibes?src=hashtag_click
      that's how the url looks .... This is going to take me a month to figure out smh. I'm about to just quit. This is too much for me.

    • @juanjure2639
      @juanjure2639 5 лет назад +1

      @@youtubenewsfeed5427 Great answer!! I got some issues too, but I'll keep trying. Thanks for your help, I have not finished it but with your help, I'm a little bit closer. Thanks a lot!!

    • @youtubenewsfeed5427
      @youtubenewsfeed5427 5 лет назад +2

      Juan No prob. I took a break. Might get back to it in a few. I figured out the url issue. But it’s not liking the tweets. Maybe I chose the wrong like class, idk... I’ll get back to it. I’m completely new to programming and it’s busting my brain.

    • @huntedshadows9381
      @huntedshadows9381 5 лет назад

      @@youtubenewsfeed5427 i figured out everything except the like thing tried searching the button elements and choosing the 3rd, using the keyboard shortcut by sending the key "L" for like and still nothing works

  • @samilaribi6173
    @samilaribi6173 5 лет назад

    incredible what you can do with python , do more videoss like this plz

  • @aravindkrishnasaravu2223
    @aravindkrishnasaravu2223 5 лет назад +3

    @Dev Ed looks like it doesnt work in the new version of twitter because the class names are from css and they are different names and there are no id tags and stuff. I have reached till searching and scrolling and then had to give up beacause it was with css and not names. Please could you help me get through and give a solution how I should write my class name and how to get all the data-permalink-path. Thank you for your help.

  • @DataScienceDom
    @DataScienceDom 4 года назад

    After 22 mins I remembered, that I don't even use Twitter :D good content, keep going

  • @idk6465
    @idk6465 5 лет назад +3

    7:11 Ed, now what if my internet is slow, and it execute the stuff but the page isn't ready?
    Edit: 8:34 you said add more time.sleep() but that seems inefficient, is there a better way?

    • @dontbetoxic4387
      @dontbetoxic4387 4 года назад

      use explicit waits www.geeksforgeeks.org/explicit-waits-in-selenium-python/

  • @DrJohana21
    @DrJohana21 3 года назад

    Wowwww best twitter bot tutorial everrrrr!!!! Thank you!!!

  • @strandebo
    @strandebo 5 лет назад +5

    Got this message:
    ElementNotInteractableException: Message: Element could not be scrolled into view
    What do I do?

    • @Gustablealves
      @Gustablealves 5 лет назад +1

      same here

    • @vishwajeetraj11
      @vishwajeetraj11 5 лет назад

      Same here

    • @debdutgoswami
      @debdutgoswami 5 лет назад

      search for the element with xpath as because there might be more than one element with same name and those are not interact-able

    • @vishalchaudhary1827
      @vishalchaudhary1827 5 лет назад

      Robbie Strandis go to sleep😂😂😂

    • @mohammedalbedwi1436
      @mohammedalbedwi1436 5 лет назад

      @@debdutgoswami can you explain more?
      I got the same message and i could not log in.

  • @vaishnavmhetre9061
    @vaishnavmhetre9061 5 лет назад

    There's a problem! After 1 iteration of Liking, the page will be at the tweet and not the hashtag page. Hence the scrollTo won't work and fetch more tweets! Second, even if you scroll down, it doesn't ignore the elements using class-name(tweet) from the last scroll. Hence in the next scroll, the elements which were already liked will still come in the list, and if HeartAnimation class exists on the button, the tweet will be unliked, and if not - 1 min sleep as per your code! I have thought about a solution for this. First scroll as many times you want on the hashtag page, the use the tweet class-name element selector to extract tweets at once. Then filter the liked tweets - (every tweet has a previous sibling of this []. If the tweet is liked, there is no content in this span, but if it is not liked there is "::before" in the span content). Now iterate the tweets on a random ranged number between (7-15 sec, before or after liking - doesn't matter) and like the tweet. This will keep the spam bot away. Secondly, if possible, don't directly visit the pages by GET but rather by clicking on the Tweet, to keep the bot from detecting organic reach through direct URL, which is suspicious when visiting URLs one after other. Bots most probably will ignore you if you click on tweets on the page directly keeping you away from Twitter Analytics. I'm writing this much coz people might lose access to their Accounts and/or get Banned on their authentic accounts by Twitter Team for Spam Botting on these accounts.

  • @timsantos
    @timsantos 5 лет назад +3

    When I try to get the data permalink paths, I can't seem to find it in the inspector, and when I run the code I only get 2 empty brackets ( [] [] ) what could I be doing wrong?

    • @scottlovejoy9235
      @scottlovejoy9235 5 лет назад +2

      Same

    • @Dorecetti
      @Dorecetti 3 года назад

      I have the same problem, were you able to solve it yourself?

  • @dragosh00
    @dragosh00 5 лет назад

    Katalon is another tool for web-based apps -- for automation. But it is nice to see that it can be done in any IDE. I am a beginner in python (never programmed anything, beside the microwave for popcorn :) ) so my knowledge is minimal.
    I will most certainly do your example. Cheers!

  • @thereborne5219
    @thereborne5219 5 лет назад +12

    pause at 1:23 u can see the hole in the ring.
    its free real estate

  • @alimedani0296
    @alimedani0296 5 лет назад

    Thank you soo much man!!!
    I'm gonna do this for IG now!!!

  • @ashutoshdubey4795
    @ashutoshdubey4795 5 лет назад +17

    print(links) -- prints empty [ ]
    what to do?

    • @michaellee1164
      @michaellee1164 5 лет назад +1

      im having the same problems

    • @yousufazad5640
      @yousufazad5640 5 лет назад +1

      same problem. any solutions...

    • @bragg02
      @bragg02 5 лет назад +17

      def like_tweet(self,hastag):
      bot = self.bot
      bot.get('twitter.com/search?q='+hastag+'&src=typed_query')
      time.sleep(3)
      for i in range(1,3):
      bot.execute_script('window.scrollTo(0,document.body.scrollHeight)')
      time.sleep(3)
      tweetLinks = [i.get_attribute('href')
      for i in bot.find_elements_by_xpath("//a[@dir='auto']")]
      filteredLinks = list(filter(lambda x: 'status' in x,tweetLinks))
      print(filteredLinks)
      for link in filteredLinks :
      bot.get(link)
      time.sleep(5)
      try:
      bot.find_element_by_xpath("//div[@data-testid='like']").click()
      time.sleep(10)
      except Exception as ex :
      time.sleep(10)

    • @YeungLorentz
      @YeungLorentz 5 лет назад +1

      @@bragg02 it works like a charm! thank you @Bragg

    • @mohammadmostafa2721
      @mohammadmostafa2721 5 лет назад +1

      @@bragg02 Thanks buddy... its working perfectly!

  • @matheusmilagres
    @matheusmilagres 5 лет назад

    dude, you are making me love your videos with all this awesome knowledge and magic trics +follow

  • @jasskaran.singh.cheema
    @jasskaran.singh.cheema 4 года назад +14

    I have followed this tutorial and it has been perfect so far. My main concern is that with the new Twitter Update its difficult to locate classes and everything as unlike in tutorial like data-permalink-path and everything else is now RANDOM texts and digits making it difficult to understand. Moreover i am not able to retrieve the output of print(links) as in tutorial and i think so that is because of new update. Please help

    • @Kay-xz5ru
      @Kay-xz5ru 4 года назад +2

      Change it to name instead of class name like this :
      username = bot.find_element_by_name("session[username_or_email]")
      password = bot.find_element_by_name("session[password]")

    • @bschs
      @bschs 4 года назад +2

      @@Kay-xz5ru but how to do this with the tweets that previously was "data-permalink-path" ?

    • @Kevin-th5rw
      @Kevin-th5rw 4 года назад

      @@bschs I have not find a way

    • @landysaccount
      @landysaccount 4 года назад +2

      I was also following this tutorial but, Twitter has changed a lot since the time of the video. The class names are different as well as the tweet links.

    • @Icelandic_hero
      @Icelandic_hero 4 года назад +7

      OWS Optimum Wireless if enough people want it I can make an updated tutorial

  • @angelozuniga9766
    @angelozuniga9766 4 года назад

    I rewatched the magic several times and im still amazed with it everytime

  • @affanwaseem7175
    @affanwaseem7175 4 года назад +3

    18:22 hey can anyone help me, with the word *elem*(unresolved reference) ?

  • @TheMagmarunning
    @TheMagmarunning 4 года назад

    Love this tutorial. Thanks Dmitri!

  • @briankingsbury6253
    @briankingsbury6253 5 лет назад +4

    Can't get it to login. The homepage is different so I changed he opening to twitter.com/login but it just opens firefox and leaves them blank like it can't find the boxes even though the names look the same in the console.

    • @albertochieng6188
      @albertochieng6188 5 лет назад

      I had the same issue. Your firefox browser is not compatible with the selenium version you have installed..try using firefox 62.0 With senenium version 3.141

    • @darylowenj
      @darylowenj 4 года назад

      just use this email = bot.find_element_by_name('session[username_or_email]')

    • @darylowenj
      @darylowenj 4 года назад

      bot.get('twitter.com/login')

  • @mois645
    @mois645 5 лет назад +1

    For those who got the error saying nonInteractableElement try to use : email = bot.find_element_by_class_name("js-username-field")
    password = bot.find_element_by_class_name("js-password-field")
    worked for me

  • @binyamingreen7600
    @binyamingreen7600 5 лет назад +3

    I've done magic in the past, great presentation. 😂

    • @Turk1881
      @Turk1881 3 года назад

      are you jewish?

  • @OtepArc
    @OtepArc 3 года назад

    This can also achive by using javascript only use console tab in the browser then do a logic code there.

  • @NITEX1
    @NITEX1 5 лет назад +3

    Twitter recieved an update.. not working unfortunatly

    • @NITEX1
      @NITEX1 5 лет назад

      @Dominic Easton yeah i tried It. Try it yourself and you will see It wont work

    • @NITEX1
      @NITEX1 5 лет назад

      @Dominic Easton Okay, i'll try again. Hoping For the best

    • @NITEX1
      @NITEX1 5 лет назад

      @Dominic Easton so I sat here for about 2 hours literally tried everything. Well, I guess the class names aren't the problem, it's just like the 'data-permalink-path' doesn't exist anymore. I don't know where, but they are somewhere. just can't find them.

    • @PerimeterX
      @PerimeterX 5 лет назад

      @Dominic Easton yea but how we should use this shit

  • @goaplmhosalgekar5764
    @goaplmhosalgekar5764 5 лет назад

    you are awesome love you bro. you are forcing me from web designer to coder :)

  • @topsl69
    @topsl69 5 лет назад +4

    Nice video, but isn't the Twitter api made for things like that?

    • @darrenlefcoe
      @darrenlefcoe 5 лет назад +1

      I have created a bot using the Twitter API, but it is more restrictive. This is quite a nice alternative method.

    • @rahulpantheon
      @rahulpantheon 4 года назад +1

      @@darrenlefcoe hi I need a bot developer. WhatsApp me +919785732768

  • @kofinyarko7368
    @kofinyarko7368 5 лет назад

    i honestly like how you explain code .... you a bit funny .. that is good for learning .

  • @shreyankshetty01
    @shreyankshetty01 5 лет назад +9

    Doesn’t work with the latest twitter update. The class name is not “tweet” any more. It’s dynamic naming of classes.
    Is there any way to use with after the latest update ?

    • @yogeshprajapati7107
      @yogeshprajapati7107 5 лет назад +1

      Same question is mine
      Please someone help us...

    • @WaqasAhmad9961
      @WaqasAhmad9961 5 лет назад +3

      The class name is just changed to "css-1dbjc4n" and not a random one.

  • @Modirule
    @Modirule 4 года назад

    1:23 pause and check the left ring(the part of ring close to his thumb), you will find the trick behind it. ;)

  • @developedbyed
    @developedbyed  5 лет назад +54

    Call me hacker boiiii

    • @moninaelkh2928
      @moninaelkh2928 5 лет назад +1

      I love your videos keep it up !

    • @Rensoku611
      @Rensoku611 5 лет назад +2

      @@ascpixi you must be the life of the party everywhere xDD

    • @scottlovejoy9235
      @scottlovejoy9235 5 лет назад

      There's no data-permalink-path any more

    • @talhamasood0000
      @talhamasood0000 5 лет назад +1

      bro help please..data-permalink-path is not there! how to fix it?

    • @mohammadsadman8567
      @mohammadsadman8567 5 лет назад

      twitter added are you a robot after login xdddd

  • @deki90to
    @deki90to 4 года назад

    One of the best tutorials!!! Tnx man

  • @justsmile3172
    @justsmile3172 5 лет назад +5

    I’m only watching this because I’m interested in the code; like understanding how it functions

    • @julk2701
      @julk2701 5 лет назад +3

      No one would really care if you were here for the Twitter bot bro.

  • @AbhiJithpyd
    @AbhiJithpyd 4 года назад +1

    Twitter changed the attributes on the tweets. All of the class names are randomized now and I cannot find that "data-permalink-path" attribute.

  • @RamiroASandoval
    @RamiroASandoval 5 лет назад +4

    New version of Twitter GG

    • @rahulpantheon
      @rahulpantheon 4 года назад

      hi I need a bot developer. WhatsApp me +919785732768

  • @Kuznetsovication
    @Kuznetsovication 5 лет назад

    According to Automated actions you take on Tweets or accounts: You may not like Tweets in an automated manner.

  • @yogeshprajapati7107
    @yogeshprajapati7107 5 лет назад +3

    When I'm trying to print links
    It's printing blank list
    Please help me

  • @v.cenergyzing2618
    @v.cenergyzing2618 5 лет назад +2

    Wow....its really great ....just wondering if one could use it to get turns of views on youtube....one just need lots of email accounts and the power of python

  • @FreedomForKashmir
    @FreedomForKashmir 5 лет назад +6

    do some more stuff related to web using Python ...
    Thanks in Advance

  • @drivelement
    @drivelement 3 года назад

    You're amazing bro, I just love your content

  • @bhnbhn0
    @bhnbhn0 4 года назад +4

    Too bad twitter removed "data-permalink", I don't know how else to catch tweets. Everything else works great, I learned a lot!

  • @TsifeyzOfficiel
    @TsifeyzOfficiel 5 лет назад +1

    hi ! thanks you so much to improve our skills, i was wondering if it was possible to do the retweet in the same 'try' function, i've seen that there's 2 part before the retweet we must click on 2 btn but i can't found the class for it. thanks for helping :) luv yall

  • @caqzz1621
    @caqzz1621 5 лет назад +4

    I get this error when I pip install selenium:
    pip : 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.
    At line:1 char:1
    + pip install selenium
    + ~~~
    + CategoryInfo : ObjectNotFound: (pip:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
    please help me xD

    • @johnjelatis2033
      @johnjelatis2033 5 лет назад

      Don't run pip whilst in the Python interpreter; it is its own command from whatever Terminal. However, running python -m pip install ... could be needed depending on system.

  • @powerpuffgirltalksabouttec2872
    @powerpuffgirltalksabouttec2872 4 года назад

    Ommg thats so awesome and you aint lonely you got loyal followers

  • @midnightarchives85
    @midnightarchives85 5 лет назад +3

    Nothing happening after opening the login page

  • @raseruuu3742
    @raseruuu3742 5 лет назад

    I did not expect the magic rings but when you showed em i suddenly got interested

  • @onunsarchive7118
    @onunsarchive7118 5 лет назад +6

    You've got to be Johny Depp's distant relative... 😂

    • @bluesque9687
      @bluesque9687 4 года назад

      Yea the beard is vaguely similar

  • @theamjolnir9641
    @theamjolnir9641 5 лет назад

    I have a video idea for you, is it possible to build an app that helps travel addicts to find the cheapest flights everywhere in the world and track those prices / email the user when something drops below a certain $ ?

  • @satyanarayana8588
    @satyanarayana8588 5 лет назад +4

    Hi, Edwin I like your videos. So upload to create an automatic Instagram followers bot in python.

    • @halfword
      @halfword 4 года назад

      u will get blocked

  • @EyeIn_The_Sky
    @EyeIn_The_Sky 5 лет назад

    As I have social media allergy and don't care for it, I just wonder how this would get you, followers. Is it just hoping for some reciprocal love after the bot clicks the heart/like button?

  • @mohammed-ld4cl
    @mohammed-ld4cl 5 лет назад +3

    Hello dev
    I follow what you did...
    but I still can't find tweet class in browser !!
    I want it to show all links

  • @utkarshsharma3178
    @utkarshsharma3178 4 года назад

    Got you at 1:22 'there is an opening in one of the ring'

  • @maxispeeltspellen4892
    @maxispeeltspellen4892 4 года назад +3

    Why did you ask if we were lonely, we want to learn code of course we don't have friends lol

  • @emmytobs
    @emmytobs 5 лет назад

    Thanks for these videos mahn

  • @alfredokumbe5919
    @alfredokumbe5919 5 лет назад +3

    Hey, if you still have a problem with identifying elements,,, Use xpaths... they work. Happy coding!!

    • @goatedggwp
      @goatedggwp 5 лет назад

      Hey, I had made this bot a week ago it was pretty much working . Now I tried to run the code again but the thing is my links list is coming up to be empty
      I tried to recheck the elements for updates and I couldn't find the class tweets and the class Data-permalink-path
      Can you please help me about rectifying the code

    • @HudZah
      @HudZah 5 лет назад

      @@goatedggwp It wont work anymore as twitter has had a update and changed the way the tweets work. The tweets now have a random id so this bot is not possible to make anymore

    • @kermi123d
      @kermi123d 5 лет назад

      @@HudZah any new ideas?

  • @hidayatullah7533
    @hidayatullah7533 5 лет назад +1

    Love ya man!