DAT 505 – Assignment Part 4 – Python Webservice APIs

The Brief: Python Webservice APIs

For the next practical exercise you must create an auto-tweet agent.

Your program should identify the most recent page viewed by your browser (by looking in either the “Current Session” or “History” file). It should then acquire the title of the page last viewed.

For example, the title of the Ebay main page is: Electronics, Cars, Fashion, Collectibles, Coupons and More | eBay.

Your program should then tweet the fact that you liked the page:
I’m really liking Electronics, Cars, Fashion, Collectibles…

You’ll get more marks if you use the History file (it’s harder !) Include a loop so that it tweets about the most recent page every hour.

Here’s a screen recording of the Python script in action on OSX and browsing via Chrome. The refresh time has been set to 20 seconds for a more interesting demonstration!

Leave a Reply