{"id":27714777,"url":"https://github.com/ghazayel/x-ray","last_synced_at":"2026-04-29T00:32:26.642Z","repository":{"id":287847375,"uuid":"965233478","full_name":"ghazayel/X-Ray","owner":"ghazayel","description":"extract info from twitter","archived":false,"fork":false,"pushed_at":"2025-04-14T08:19:33.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-27T00:56:41.956Z","etag":null,"topics":["chrome","scraper","twitter","x"],"latest_commit_sha":null,"homepage":"https://ghazayel.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghazayel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-12T17:51:14.000Z","updated_at":"2025-04-14T08:19:36.000Z","dependencies_parsed_at":"2025-04-14T09:33:50.976Z","dependency_job_id":"f94bd458-5370-427c-9ad9-518f73fd23a5","html_url":"https://github.com/ghazayel/X-Ray","commit_stats":null,"previous_names":["ghazayel/x-ray"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghazayel%2FX-Ray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghazayel%2FX-Ray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghazayel%2FX-Ray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghazayel%2FX-Ray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghazayel","download_url":"https://codeload.github.com/ghazayel/X-Ray/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251073631,"owners_count":21532009,"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":["chrome","scraper","twitter","x"],"created_at":"2025-04-27T00:56:44.828Z","updated_at":"2026-04-29T00:32:26.616Z","avatar_url":"https://github.com/ghazayel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 🐦 X-Ray: Data Extraction Tool  \n### Built by [@ghazayel](https://x.com/ghazayel) | Powered by Selenium\n\n---\n\n### ✨ Overview\n\nWelcome to the **X-Ray Scraping Tool** — your trusty sidekick for journalistic investigations, data analysis, or tracking public conversations across **X (formerly Twitter)**. This tool automates the scraping of live tweets within a custom date range, capturing tweet content, timestamps, usernames, retweets, likes, and replies — and outputs everything into a clean `.csv` file 📊.\n\n\u003e 📰 Whether you're chasing a breaking story or analyzing social sentiment, this script does the heavy lifting for you.\n\n---\n\n### 🚀 Features\n\n- 🔍 **Search by keyword/hashtag**\n- 🗓️ **Custom date ranges**\n- 📄 **Auto-export to CSV**\n- 🤖 **Uses real browser session (Chrome) for better authenticity**\n- 🔐 **Preserves login/session with your own Chrome profile**\n- 📈 **Retweet, like, and reply counts included**\n- 🎨 **Beautiful colored CLI interface**\n- 🧠 **Smart scroll \u0026 duplicate handling**\n\n---\n\n### 📸 Preview\n\n```\nWELCOME TO TWITTER SCRAPING TOOL!\nCreated by Mahmoud Ghazayel - @ghazayel\n\nInitializing...\nReady to go!\n\nEnter the search term: gaza\nEnter start date (YYYY-MM-DD): 2025-01-01\nEnter end date (YYYY-MM-DD): 2025-01-05\nEnter number of tweets to collect: 100\n\nScraping complete. Total tweets collected: 100\n✅ Scraping done successfully! Press Enter to exit.\n```\n\n---\n\n### 🛠️ Requirements\n\nEnsure the following Python packages are installed:\n\n```bash\npip install selenium webdriver-manager colorama\n```\n\nAnd of course, have **Google Chrome** installed. The script uses your own Chrome user session for authentication.\n\n---\n\n### ⚙️ Setup \u0026 Usage\n\n1. **Clone the repository:**\n\n```bash\ngit clone https://github.com/ghazayel/X-Ray-scraper.git\ncd X-Ray-scraper\n```\n\n2. **Customize your Chrome path:**\n\nMake sure this line reflects your system profile path:\n```python\noptions.add_argument(\"--user-data-dir=C:\\Users\\User\\AppData\\Local\\Google\\Chrome\\User Data\")\n```\n\n3. **Run the script:**\n\n```bash\npython X-Ray_scraper.py\n```\n\n4. **Input your query:**\n\nYou'll be prompted to enter:\n- A keyword or hashtag (no `#` needed)\n- Start date (`YYYY-MM-DD`)\n- End date (`YYYY-MM-DD`)\n- Number of tweets to collect\n\n5. **Output:**\n\nYour tweets will be saved in a file like `twitter_data.csv`.\n\n---\n\n### 🧠 How It Works\n\nThis scraper mimics human browsing:\n- Opens a browser window with your Chrome session\n- Navigates to X (Twitter) search\n- Scrolls dynamically to load tweets\n- Extracts data using Selenium\n- Handles duplicates \u0026 errors gracefully\n- Outputs a well-structured CSV\n\n---\n\n### 📌 Notes\n\n- This tool **does not use Twitter/X API**, which makes it ideal for scraping without needing developer credentials.\n- This tool might **NOT** work correctly if the Elon Musk decided to change the UI of X or how the LazyLoading works on the site.\n- Always respect the [terms of service](https://x.com/en/tos) of any platform you interact with.\n- Ideal for **journalists, researchers, analysts**, and OSINT professionals.\n\n---\n\n### 📁 Output Sample (CSV)\n\n| text | timestamp | username | retweets | likes | replies |\n|------|-----------|----------|----------|-------|---------|\n| Breaking: UN warns of... | 2025-01-01T12:00:00Z | @UN_News | 145 | 500 | 30 |\n\n---\n\n### 🙋‍♂️ Author\n\n**Mahmoud Ghazayel**  \n📸 Journalist \u0026 OSINT Specialist  \n📍 [@ghazayel](https://x.com/ghazayel)  \n📜 [ghazayel.com](https://ghazayel.com)  \n📬 Feel free to open an issue or suggest improvements!\n\n---\n\n### 🧪 Final Word\n\nIf this project helped your reporting or research, give it a ⭐ on GitHub.  \nIt keeps this tool alive, accurate, and evolving.\n\n```\n🕵️ Stay curious. Stay informed. Stay independent.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghazayel%2Fx-ray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghazayel%2Fx-ray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghazayel%2Fx-ray/lists"}