Guess Twitter Account from company URL
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

I need a python script that can guess twitter account from company URL
It's ok to make use of API
Clean URLs if needed

INPUT
https://polygon.technology/careers?ref=xyz
https://binance.com
https://ledger.com
https://chainlinklabs.com
https://aptoslabs.com
https://request.network/
https://www.chainalysis.com/
https://www.gelato.network/
https://www.monad.xyz
https://monaxlabs.io/
https://prepo.io/
https://www.chainalysis.com/

OUTPUT
0xPolygon
Binance
Ledger
chainlink
aptoslabs
RequestNetwork
chainalysis
gelatonetwork
monad_xyz
aspenft
prepo_io
chainalysis

Tags
python

Crowdsource coding tasks.

1 Solution


You can use Tweepy to search for accounts that have a specific url in their bio.

import tweepy

consumer_key = 'YOUR_CONSUMER_KEY'
consumer_secret = 'YOUR_CONSUMER_SECRET'
access_token = 'YOUR_ACCESS_TOKEN'
access_token_secret = 'YOUR_ACCESS_TOKEN_SECRET'

auth = tweepy.OAuth1UserHandler(consumer_key, consumer_secret, access_token, access_token_secret)

api = tweepy.API(auth)

url = "https://www.example.com"
users = tweepy.Cursor(api.search_users, q=url).items()


for user in users:
    print(user.screen_name)
Thanks for the solution. This requires an Elevated access to the API. I'm trying to apply. 453 - You currently have Essential access which includes access to Twitter API v2 endpoints only. If you need access to this endpoint, you’ll need to apply for Elevated access via the Developer Portal. You can learn more here: https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api#v2-access-leve
Raphael 1 day ago