https://github.com/letsmakecakes/twitter-automation
Twitter Automation with Selenium in Python.
https://github.com/letsmakecakes/twitter-automation
automation python selenium twitter
Last synced: about 2 months ago
JSON representation
Twitter Automation with Selenium in Python.
- Host: GitHub
- URL: https://github.com/letsmakecakes/twitter-automation
- Owner: letsmakecakes
- License: mit
- Created: 2023-06-05T06:33:15.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-05T07:03:10.000Z (about 3 years ago)
- Last Synced: 2025-01-14T01:49:45.289Z (over 1 year ago)
- Topics: automation, python, selenium, twitter
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Twitter Automation Project
This is a Python script that uses Selenium to automate tweeting on Twitter. It opens a Chrome browser, logs in to a Twitter account, and sends a tweet with a predefined message.
## Prerequisites
Before running the script, make sure you have the following installed:
- Python (version 3.6 or higher)
- Selenium library (install using `pip install selenium`)
- Chrome browser
- ChromeDriver (compatible with your Chrome browser version)
## Setup
1. Clone the repository:
```bash
git clone https://github.com/your-username/twitter-automation.git
cd twitter-automation
```
2. Install the required dependencies:
```bash
pip install selenium
```
3. Download ChromeDriver and place it in the project directory. Make sure it matches your Chrome browser version. You can download ChromeDriver from the [official website](https://chromedriver.chromium.org/downloads).
## Usage
1. Open the `twitter_automation.py` file in a text editor.
2. Replace the placeholders `'username'` and `'password'` with your Twitter account credentials:
```python
username.send_keys("your-username")
password.send_keys("your-password")
```
3. Modify the `tweet` variable to customize the message you want to tweet:
```python
tweet = "Hello Everyone! This is a tweet..."
```
4. Save the file.
5. Run the script:
```bash
python twitter_automation.py
```
The script will open a Chrome browser, log in to your Twitter account, and send the tweet with the specified message.
**Note:** For security reasons, it's recommended to store your Twitter credentials in a separate configuration file and import them into the script instead of hardcoding them directly.
## License
This project is licensed under the [MIT License](LICENSE). Feel free to use and modify it according to your needs.
## Contributing
Contributions are welcome! If you have any improvements or bug fixes, please submit a pull request.