Skip to content

Automatically tweet daily using Python Selenium and Heroku.

License

Notifications You must be signed in to change notification settings

kurkurzz/Twitter-Auto-Tweet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitter Auto Tweet

Automatically tweet daily using Python and Selenium without using Twitter API.

Take Note :

Steps to create this bot


1. Install required packages to python


Type the command in terminal

$ sudo pip3 install selenium schedule


2. Clone this repository


3. Create credentials.py file

Insert code below

credential = {
    'EMAIL' : 'twitter-email',
    'PASSWORD' : 'twitter-password',
    'PHONE_NUMBER' : 'twitter-phone-number'
}

4. Run the script


  • In the project directory terminal, run command

    $ sudo python3 main.py

  • To enable script running in the background even after closed terminal, in the project directory terminal, run command

    $ nohup python3 -u main.py &

    • To kill the process, run command

      $ ps ax | grep main.py

      Then, get the process id, example 2031 and run command

      $ kill -9 2031

    • To see the log file, run command

      $ tail -f nohup.out

5. Edit time interval


  • Take a look at Python's schedule documentation and you can change it however you want (the code is at the end of the main.py file).

  • By default, it was set to 7 AM every day.

About

Automatically tweet daily using Python Selenium and Heroku.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages