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.66k stars 2.72k forks source link

twint add new field to elasticsearch twintgraph index #592

Closed sorgan191 closed 4 years ago

sorgan191 commented 4 years ago

I need help with adding new fields to twint follow result I use python3.6 twint -u "username" --followers -es localhost:9200 after creating twintgraph index i get : _id _index _score _type essid follow user i want to add new field with name : "name" contain the user name (user) best regards

pielco11 commented 4 years ago

You can just change the field name here

https://github.com/twintproject/twint/blob/7ea55b2aa0dd1c5c2fe991347e2dfce7fbdb2d43/twint/storage/elasticsearch.py#L298-L324

Also remember to change the schema before creating the index

https://github.com/twintproject/twint/blob/7ea55b2aa0dd1c5c2fe991347e2dfce7fbdb2d43/twint/storage/elasticsearch.py#L123-L138

sorgan191 commented 4 years ago

pielco11 thank you for your help it's work :+1: +1: