Giter VIP home page Giter VIP logo

rishi-raj-jain / twitterusernamefromuserid Goto Github PK

View Code? Open in Web Editor NEW
17.0 1.0 4.0 21.53 MB

twitterUsernameviaUserID is an advanced Twitter scraping tool written in Python and Selenium that allows for scraping tweet usernames from the twitter id's, without using Twitter's API.

Home Page: https://pypi.org/project/twitterUsernameviaUserID

License: MIT License

Python 100.00%
selenium twitter chrome opensource chromedriver python3 python automation json time

twitterusernamefromuserid's Introduction

Pull Requests Welcome first-timers-only Friendly GitHub license Selenium Python Chrome

No authentication. No API. No limits.

twitterUsernameviaUserID is an advanced Twitter scraping tool written in Python and Selenium that allows for scraping tweet usernames from the twitter id's, without using Twitter's API.

tl;dr Benefits

Some of the benefits of using twitterUsernameviaUserID vs Twitter API:

  • Can fetch all tweet usernames from their id's (Twitter API limits to last 3200 Tweets only);
  • Fast initial setup;
  • Can be used anonymously and without Twitter sign up;
  • No rate limitations.

Requirements

  • Python >= 3.6
  • Selenium
  • WebDriver Manager

Installing

Pip:

- pip3 install twitterUsernameviaUserID
- Voila!

Example:

    from twitterUsernameviaUserID import getHandles as gH
    # A dictionary with mapped user ids to their usernames
    temp= gH.getHandles([<list of user ids (in string)>], <delay in seconds>)

twitterusernamefromuserid's People

Contributors

devansh-srivastav avatar dvanne avatar rishi-raj-jain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

twitterusernamefromuserid's Issues

Clarification of the delay units

According to the source code, the delay is in seconds rather than milliseconds, please add a notice of the units in the ReadME example.

how can I use.. :(

pip3 install twitterUsernameviaUserID it's installed. but how can I use. i don't understand.

tweet text from ID

Does this project allow for scraping tweet text from the twitter id's?

Starting Chrome in headless mode causing timeout exception

Commenting out line 35 in getHandles (ChromeOptions.add_argument("--headless")) fixes issue, but this isn't ideal as it results in multiple Chrome windows taking over desktop, especially when collecting a large number of usernames. I'll create a branch with a workaround that allows headless mode.

Threading to improve speed?

Currently, this allows 50K users in a span of 69 hours, while even with three instances in parallel, this could drastically reduce to 23 hours and the user won't need to do anything. It'd be better than APIs as you don't have to wait for say another day to start hitting APIs. Any ideas @DVanne ?

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.