Closed Frickson closed 4 years ago
I would like to learn that too. Could anyone helps?
this wont have the same behavior as --profiles
but if you want the info for a single username, you can do
import twitterscraper, json
from twitterscraper.main import JSONEncoder
result = twitterscraper.query.query_user_info('jack')
with open('myoutput.json', "w", encoding="utf-8") as output:
json.dump(result, output, cls=JSONEncoder)
Please examine query.py
and main.py
to see the inputs for other functions and try them out!
Can I request for an example of python script to get the data same as the CLI below did? (twitterscraper username --profiles --o filename.json)