twintproject / twint

An advanced Twitter scraping & OSINT tool written in Python that doesn't use Twitter's API, allowing you to scrape a user's followers, following, Tweets and more while evading most API limitations.
MIT License
15.83k stars 2.73k forks source link

return list of results as an array #509

Closed lucmski closed 5 years ago

lucmski commented 5 years ago

Hi guys,

Hope you are all well !

I would like to replace get_followers func by using twint. https://github.com/yanorestes/botblocker/blob/master/botblocker/botblocker.py#L11-L18

How is it possible to return values like:

def get_followers_twint(username):
    # followers = []   
    c = twint.Config()
    c.Username = username
    twint.run.Followers(c)
    #for ids in tweepy.Cursor(api.followers_ids, screen_name=username).pages():
    #    followers.extend(ids)
    return twint.run.Followers(c)

Thanks in advance.

Cheers, L.

lucmski commented 5 years ago

found it

def get_followers_twint(username):
    c = twint.Config()
    c.Username = username
    c.Store_object = True
    # c.Limit = 20
    twint.run.Followers(c)
    return twint.output.follows_list

How can you prevent the output of the list in the stdout ?

pielco11 commented 5 years ago

@lucmski do you mean not seeing the output? Try c.Hide_output = True

lucmski commented 5 years ago

Thanks it worked nicely ! but botometer is too slow...

Do u have a telegram account ? I would like to contrib with a faceted search app for twint.

Mine is @deepocrates

pielco11 commented 5 years ago

Is Telegram really needed? If you want, you can join osint.team and DM me there. You can email me, or DM me on Twitter. As you may prefer