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.68k stars 2.71k forks source link

Return data #1292

Open ZarchiMohammad opened 2 years ago

ZarchiMohammad commented 2 years ago

I use this code:

import twint

c = twint.Config()
c.Username = "jack"
c.Format = "ID: {id} | Username: @{username}"
twint.run.Lookup(c)

But I do not want the values to be printed in the output, I want them to be returned to me so that I can print them whenever I want, like the following code:

import twint

c = twint.Config()
c.Username = "jack"
c.Format = "ID: {id} | Username: @{username}"
data = twint.run.Lookup(c)
print(f"Code Result is {data}")

What should I do?

DevGlitch commented 2 years ago

Just add config.Hide_output = True