{"id":13658262,"url":"https://github.com/Nedja995/twint_server","last_synced_at":"2025-04-24T08:31:47.499Z","repository":{"id":114939826,"uuid":"179865698","full_name":"Nedja995/twint_server","owner":"Nedja995","description":"TWINT Flask-Celery Server. Optimized tweets scraping","archived":false,"fork":false,"pushed_at":"2019-06-02T15:10:50.000Z","size":12,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-10T11:39:39.924Z","etag":null,"topics":["celery","distributed","elasticsearch","flask","flower","optimized","python","scraper","twint","twitter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nedja995.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-04-06T17:35:02.000Z","updated_at":"2021-05-23T11:35:25.000Z","dependencies_parsed_at":"2023-07-08T06:49:49.190Z","dependency_job_id":null,"html_url":"https://github.com/Nedja995/twint_server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nedja995%2Ftwint_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nedja995%2Ftwint_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nedja995%2Ftwint_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nedja995%2Ftwint_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nedja995","download_url":"https://codeload.github.com/Nedja995/twint_server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250592054,"owners_count":21455490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["celery","distributed","elasticsearch","flask","flower","optimized","python","scraper","twint","twitter"],"created_at":"2024-08-02T05:00:58.119Z","updated_at":"2025-04-24T08:31:47.203Z","avatar_url":"https://github.com/Nedja995.png","language":"Python","readme":"### [TWINT](https://github.com/twintproject/twint) Flask-Celery Server\nOptimized tweets scraping\n\n#### See also [Twint Kibana](https://github.com/Nedja995/twint_kibana)\n\n#### Requirements\n- Python3, [Twint](https://github.com/twintproject/twint), Flask, Celery\n- Elasticsearch(v7)\n- RabitMQ\n- (optional) Flower \n\n#### Run server\n\n1. Run Celery workers: \n- `$ celery worker --app=worker.celery --hostname=worker.fetching@%h --queues=fetching --loglevel=info`\n- (Optional) task for reporting progress if it is implemented `$ celery worker --app=worker.celery --hostname=worker.saving@%h --queues=saving --loglevel=info`\n\n2. Run Flask server: `$ python3 app.py`\n\n- (Optional) Monitor Celery with Flower: `$ celery -A app.celery flower --broker='pyamqp://guest@localhost//'`\n\n#### Use\n\n1. Create ES index with [index-tweets.json](elasticsearch/index-tweets.json)\n\n2. Start tweets fetching\n- arguments are mapped to [twint config](https://github.com/twintproject/twint/blob/master/twint/config.py)\n- I mainly use it with elasticsearch so I did not test with other arguments\n- Since and Until and Search/User are required\n```\n  POST  http://localhost:5000/fetch\n  {\n    \"Since\": \"2019-2-1\",\n    \"Until\": \"2019-3-1\",\n    \"Search\": \"\u003ckeyword\u003e\",\n    // or\n    \"User\": \"\u003cusername\u003e\"\n    \"Elasticsearch\": \"localhost:9200\",\n    \"Index_tweets\": \"\u003ces index name\u003e\"\n  }\n```\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNedja995%2Ftwint_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNedja995%2Ftwint_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNedja995%2Ftwint_server/lists"}