{"id":23619271,"url":"https://github.com/thecoderadi/stir-webscrape-intern","last_synced_at":"2025-11-07T00:30:56.011Z","repository":{"id":269730598,"uuid":"908278199","full_name":"TheCoderAdi/stir-webscrape-intern","owner":"TheCoderAdi","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-25T17:02:28.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-25T18:17:42.371Z","etag":null,"topics":[],"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/TheCoderAdi.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,"publiccode":null,"codemeta":null}},"created_at":"2024-12-25T16:58:09.000Z","updated_at":"2024-12-25T17:02:31.000Z","dependencies_parsed_at":"2024-12-25T18:17:44.804Z","dependency_job_id":"0442e639-53bf-40e3-8176-d775780819db","html_url":"https://github.com/TheCoderAdi/stir-webscrape-intern","commit_stats":null,"previous_names":["thecoderadi/stir-webscrape-intern"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCoderAdi%2Fstir-webscrape-intern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCoderAdi%2Fstir-webscrape-intern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCoderAdi%2Fstir-webscrape-intern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCoderAdi%2Fstir-webscrape-intern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheCoderAdi","download_url":"https://codeload.github.com/TheCoderAdi/stir-webscrape-intern/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239513382,"owners_count":19651323,"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":[],"created_at":"2024-12-27T19:48:37.239Z","updated_at":"2025-11-07T00:30:55.920Z","avatar_url":"https://github.com/TheCoderAdi.png","language":"Python","readme":"# Twitter Trends Viewer\r\n\r\nTwitter Trends Viewer is a web application that fetches the top trending topics on Twitter using Selenium, ProxyMesh, and MongoDB, and displays them on a simple and elegant HTML page.\r\n\r\n## Features\r\n\r\n- **Fetch Twitter Trends**: Automatically logs into Twitter, fetches the latest trending topics, and stores them in a MongoDB database.\r\n- **Proxy Support**: Uses ProxyMesh for secure and anonymous web scraping.\r\n- **Responsive UI**: Displays the fetched trends, including the timestamp, IP address, and JSON record, in a clean and user-friendly interface.\r\n- **MongoDB Integration**: Trends are stored in a MongoDB database with unique IDs for easy access.\r\n\r\n---\r\n\r\n## Installation and Setup\r\n\r\n### Prerequisites\r\n\r\n- Python 3.8+\r\n- MongoDB instance (local or cloud)\r\n- Selenium WebDriver (Microsoft Edge)\r\n- Node.js (optional for further customization)\r\n- ProxyMesh credentials\r\n\r\n### Clone the Repository\r\n\r\n```bash\r\n$ git clone [\u003crepository-url\u003e](https://github.com/TheCoderAdi/stir-webscrape-intern\r\n$ cd stir-webscrape-intern\r\n```\r\n\r\n### Install Dependencies\r\n\r\n   Install Python dependencies:\r\n   ```bash\r\n   $ pip install -r requirements.txt\r\n   ```\r\n\r\n### Configure Environment\r\n\r\n1. Create a `.env` file in the `root` folder:\r\n\r\n   ```python\r\n       TWITTER_USERNAME = \"your-twitter-username\"\r\n       TWITTER_PASSWORD = \"your-twitter-password\"\r\n       MONGO_URI = \"mongodb://localhost:27017\"\r\n       PROXYMESH_USERNAME = \"your-proxymesh-username\"\r\n       PROXYMESH_PASSWORD = \"your-proxymesh-password\"\r\n   ```\r\n\r\n### Run the Application\r\n\r\n1. Start the Flask server:\r\n   ```bash\r\n   $ python app.py\r\n   ```\r\n2. Open your browser and navigate to:\r\n   ```\r\n   http://127.0.0.1:5000\r\n   ```\r\n\r\n---\r\n\r\n## File Structure\r\n\r\n```\r\n.\r\n├── app.py                # Flask app to serve the frontend and backend\r\n├── src\r\n│   ├── selenium_script.py # Selenium script for web scraping\r\n│   ├── config.py          # Configuration file for credentials\r\n├── static\r\n│   ├── index.html         # Main HTML file for the UI\r\n├── requirements.txt      # Python dependencies\r\n└── README.md             # Project documentation\r\n```\r\n\r\n---\r\n\r\n## How It Works\r\n\r\n1. **Proxy and IP Setup**:\r\n\r\n   - The application uses ProxyMesh for secure access to Twitter.\r\n   - IP testing ensures the proxy is functional.\r\n\r\n2. **Selenium Web Scraping**:\r\n\r\n   - Logs into Twitter using credentials.\r\n   - Fetches trending topics using XPath selectors.\r\n\r\n3. **Data Storage**:\r\n\r\n   - Trends are stored in MongoDB with a unique ID and timestamp.\r\n\r\n4. **Frontend Display**:\r\n\r\n   - Trends are fetched from the backend and displayed in a user-friendly interface.\r\n\r\n---\r\n\r\n## Technologies Used\r\n\r\n- **Backend**: Python, Flask\r\n- **Frontend**: HTML, CSS, JavaScript\r\n- **Database**: MongoDB\r\n- **Web Scraping**: Selenium\r\n- **Proxy Management**: ProxyMesh\r\n\r\n---\r\n\r\n## Known Issues\r\n\r\n- Twitter may restrict access if the scraping frequency is too high.\r\n- ProxyMesh limits may apply depending on your subscription.\r\n- Ensure that your Selenium WebDriver version matches your browser version.\r\n\r\n---\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License. See the LICENSE file for details.\r\n\r\n---\r\n\r\n## Acknowledgments\r\n\r\n- [Selenium](https://www.selenium.dev/)\r\n- [ProxyMesh](https://proxymesh.com/)\r\n- [MongoDB](https://www.mongodb.com/)\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecoderadi%2Fstir-webscrape-intern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecoderadi%2Fstir-webscrape-intern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecoderadi%2Fstir-webscrape-intern/lists"}