{"id":15372296,"url":"https://github.com/reorx/ts","last_synced_at":"2025-07-16T09:31:56.012Z","repository":{"id":53030516,"uuid":"66647623","full_name":"reorx/ts","owner":"reorx","description":"Twitter Search CLI","archived":false,"fork":false,"pushed_at":"2021-04-09T03:13:35.000Z","size":478,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-18T00:44:47.801Z","etag":null,"topics":["cli","python","search","twitter"],"latest_commit_sha":null,"homepage":null,"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/reorx.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}},"created_at":"2016-08-26T12:54:38.000Z","updated_at":"2023-06-26T22:36:32.000Z","dependencies_parsed_at":"2022-09-09T01:42:05.666Z","dependency_job_id":null,"html_url":"https://github.com/reorx/ts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reorx/ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reorx%2Fts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reorx%2Fts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reorx%2Fts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reorx%2Fts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reorx","download_url":"https://codeload.github.com/reorx/ts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reorx%2Fts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265499890,"owners_count":23777369,"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":["cli","python","search","twitter"],"created_at":"2024-10-01T13:50:04.042Z","updated_at":"2025-07-16T09:31:55.979Z","avatar_url":"https://github.com/reorx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ts\n\n![Screen Shot](screenshot.png)\n\nTwitter Search CLI\n\n## Install\n\n    pip install ts\n\n\n## Usage\n\nBefore actual usage, you need to initialize config file first:\n\n    ts --init\n\nThe first time you run ts, it will guide you through an OAuth authentication process.\nThe tokens will be stored at `~/.ts.config.json`, any time you want refresh the tokens, run:\n\n    ts --auth\n\nto make authentication again and update the tokens in config.\n\nRun `ts -h` to see complete usage instructions:\n\n```\nusage: ts [-c COUNT] [-l LANG] [--link] [-d] QUERY\n       ts [--init|--auth|--config CONFIG] [-d]\n\nTwitter Search CLI\n\nSearch options:\n  QUERY             search query, see:\n                    https://dev.twitter.com/rest/public/search\n  -c COUNT          set result number, by default it's 50\n  -l LANG           set search language (en, zh-cn), see:\n                    https://dev.twitter.com/rest/reference/get/help/languages\n\nDisplay options:\n  --link            append link with tweet\n  -d                enable debug log\n  -dd               debug deeper (more verbose)\n\nImage options:\n  --download-medias DOWNLOAD_MEDIAS\n                        Download medias by tweet id or url\n  --auto-naming         Name the downloaded files automatically, if not\n                        passed, name in the url will be used.\n  --download-dir DOWNLOAD_DIR\n                        dir path to download medias, by default it's current\n                        dir\n\nOther options:\n  --init            init config file\n  --auth            make authentication with twitter\n  --config {proxy}  config ts, support arguments: `proxy`\n  -h, --help        show this help message and exit\n```\n\n### Search Tweets\n\nThe search syntax is the same as [Twitter Web Search](https://twitter.com/search-home) or\n[Twitter Search API](https://dev.twitter.com/rest/public/search).\nHere are some common search query examples:\n\n1. Find what a person had said:\n\n       ts 'from:NASA Elon Musk'\n\n2. Find what people said to a person in a topic:\n\n       ts '#Hearthstone to:bdbrode'\n\n### Download Media in Tweet\n\nYou can download photos or videos in a tweet, animated gif is likely not supported yet,\ncontributions are welcomed.\n\nSee usage examples below:\n\n1. Download media (videos) to current directory:\n\n       ts --download-media 'https://twitter.com/iyasareru_d/status/1013023169408569344'\n\n       ts --download-media 1013023169408569344\n\n2. Download media (photos) to a specific path, using auto generated names:\n\n       ts --download-dir ~/Downloads --auto-name --download-media \\\n           'https://twitter.com/bangqiaoyan2018/status/1012941662937444357'\n\n## Proxy\n\nts supports proxying, you can set proxy by run ``ts --config proxy``,\na proxy address is something like `http://localhost:1000` or `https://user:pass@fast.proxy.com`.\n\nNote that by default ts only supports HTTP(S) proxying, if you want to use socks5 proxy,\nyou'll need to install `requests[socks]` before using it. For more information see\n[requests document](http://docs.python-requests.org/en/master/user/advanced/#socks).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freorx%2Fts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freorx%2Fts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freorx%2Fts/lists"}