Code Project: control Digg with Python | Linux Today

Code Project: control Digg with Python

Written By
Web Webster
Web Webster
Nov 13, 2009

“You should know that, even though there’s a perfectly
reasonable – if slightly out of date – API for Digg, we’re going to
create our own miniature one instead that does just what we need.
If you want to go further you’ll find this an easy place to start,
and it also gives you some good practice in working with XML.

“Many sites use a particular form of communication for their API
and some use several. Of these, the most popular are JSON and XML.
JSON is simpler and easy to integrate into JavaScript, which is why
it often pops up. XML is bigger, chunkier and prettier. It’s also
slightly easier to follow, but you end up with swathes of response
even for a simple query. Still, it’s what we’ll use here.

“To be fair, there isn’t a great deal of difference between
them, but XML is the lingua franca of the web, so if you can handle
API calls through XML, it will stand you in good stead.

“Python handles XML well and has an established module for
manipulating it, but we’re getting ahead of ourselves. The first
thing we need to do is determine how we can interact with the Digg
API in the first place. And, as with many web-savvy social
websites, Digg has lots of documentation for programmers on how to
use the API. Yay!”

Complete
Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.