Skip to content

tamoor622498/DailyHistoryBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

forthebadge made-with-python

DailyHistoryBot 2.0

A python twitter bot that posts history facts related to the day from Wikipedia with related images. This is meant to function using python3.

Main Libraries:

  • BeautifulSoup - Scrapes webpages and parces the HTML to get the daily event data and images.

  • tweepy - Tweets to a twitter account using python code.

  • lxml - Parcer used for BeautifulSoup.

  • requests - Grabs page HTML and downloads images.

Authentication.py:

import tweepy
def authFunc():
auth = tweepy.OAuthHandler("CONSUMER_KEY","CONSUMER_SECRET")
auth.set_access_token("ACCESS_TOKEN", "ACCESS_TOKEN_SECRET")
return tweepy.API(auth)

The file or function should look like this. I have not included then in the repo for the security of my twitter account.
You can get the keys and tokens by signing up for a twitter developer account. For detailed tutorial, look at this guide.

About

A python twitter bot that posts history facts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages