Giter VIP home page Giter VIP logo

twitter_script's Introduction

The Playbook: https://docs.google.com/document/d/1VC6mFMOsGqmf6EXV6eZjzEdp19yinLL_eVHj5Q2hWBA/edit?usp=sharing

Installing this script

  • Install Ruby
    • If you're on Mac, you will already have Ruby pre-installed on your machine.
    • If you're using Windows, download these executable files and follow their instructions:
  • Now that the Ruby setup is done, download Atom Code Editor
  • Install Watir web driver: gem install watir-webdriver
  • Install the Google drive gem: gem install google_drive
  • Install PhantomJS
    • If you're on windows, download the PhantomJS executable
    • If you're on Mac:
      • Download Xcode from Apple Store. Apple’s XCode development software is used to build Mac and iOS apps, but it also includes the tools you need to compile software for use on your Mac
      • Install Homebrew and follow the instructions (You’ll see messages in the Terminal explaining what you need to do to complete the installation process): ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
      • Verify your installation by entering brew -v
  • Download the script
  • Create a folder called "bots" on your Desktop
  • Unzip the file and place its contents in the bots folder on your Desktop.
  • Allow the script to access your Google Drive account by getting your google client_id & client_secret with this guide. Once you get your “client_id” and "client_secret" keys, enter it in the file called “google_drive_config.json”
  • Now that's all for installation, next up is how to use the script.

Get lead details from a list of Twitter profile URLs in a Google Sheet

  1. Open the source code in Atom by opening up the Atom editor on your computer, click on File > Open, select the bots folder on the Desktop and click “Open”.
  2. Get your Google Sheet key and enter it in @config > spreadsheet_key in the twitter.rb file. How to get your google sheet key
  3. Make sure the list of your Twitter profile URLs are in the first column.
  4. Uncomment line 190 by removing the # in front of initialize_from_gsheet.
  5. Open up your command line by searching for “cmd.exe” on Windows or “terminal” on Mac.
  6. Then navigate to the bots folder, provided you followed the installation guide above and placed the script in the bots folder on your Desktop. If not, navigate to where you put it.
  7. If you're on Windows enter: cd \Desktop\bots
  8. If you're on Mac enter: cd Desktop/bots
  9. Run the script by running: ruby twitter.rb &

Get all the details of followers/following of any twitter account

  1. Open the source code in Atom by opening up the Atom editor on your computer, click on File > Open. Select the bots folder on the Desktop and click the “Open” button.
  2. Get your Google Sheet key as explained in the second step above.
  3. Make sure your Google sheet is empty.
  4. Fill in all of the @config variables. Your Twitter username and password, the Google sheet key, and the URL of the account you want to get the followers/following of.
  5. Uncomment line 192 by removing the # in front of add_twitter_friend_list_to_gsheet('followers'), if you want to get followers.
  6. Uncomment line 193 by removing the # in front of add_twitter_friend_list_to_gsheet('following'), if you want to get following.
  7. Open up your command line by searching for “cmd.exe” on Windows or “terminal” on Mac.
  8. Then navigate to the bots folder, provided you followed the installation guide above and placed the script in the bots folder on your Desktop. If not, navigate to where you put it.
  9. If you're on Windows enter: cd \Desktop\bots
  10. If you're on Mac enter: cd Desktop/bots
  11. Run the script by running: ruby twitter.rb &

Clean up your list of usernames from the Scrape Similar extension

  1. Enter your Google sheet key in the @config > spreadsheet_key.
  2. Uncomment line 191 by removing the # in front of cleanup_scrape_similar_data.
  3. Open up your command line by searching for “cmd.exe” on Windows or “terminal” on Mac.
  4. Then navigate to the bots folder, provided you followed the installation guide above and placed the script in the bots folder on your Desktop. If not, navigate to where you put it.
  5. If you're on Windows enter: cd \Desktop\bots
  6. If you're on Mac enter: cd Desktop/bots
  7. Run the script by running: ruby twitter.rb &

Mass follow/unfollow a list of twitter users on Google sheet

  1. Open the source code in Atom by opening up the Atom editor on your computer, click on File > Open. Select the bots folder on the Desktop and click the “Open” button.
  2. Get your Google Sheet key as explained in the second step above.
  3. Fill in all of the @config variables. Your Twitter username and password, and the Google sheet key.
  4. Uncomment line 194 by removing the # in front of relationship('follow'), if you want to mass follow.
  5. Uncomment line 195 by removing the # in front of relationship('unfollow'), if you want to mass unfollow.
  6. Open up your command line by searching for “cmd.exe” on Windows or “terminal” on Mac.
  7. Then navigate to the bots folder, provided you followed the installation guide above and placed the script in the bots folder on your Desktop. If not, navigate to where you put it.
  8. If you're on Windows enter: cd \Desktop\bots
  9. If you're on Mac enter: cd Desktop/bots
  10. Run the script by running: ruby twitter.rb &

​Want to learn how to write scripts like this yourself? Take my free email course

twitter_script's People

Contributors

tomiwaadey avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

dteamai

twitter_script's Issues

Can't push ruby twitter.rb

I'm trying to push the app, but have this error in my terminal, any ideas?

WARN Selenium [DEPRECATION] Selenium support for PhantomJS is deprecated. Use headless Chrome/Firefox or HTMLUnit instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.