Aggregating and searching for developers projects in Python
bitbucket.org, code.google.com, or github.com host a lot of open source projects made by developers around the world. If you make a website or an article about given technology, language it would be nice to gather projects matching your topic from those code hosting providers. In this article I'll show Python scripts that can do that easily.
GithubYou can use Github API, that returns data in YAML format, but in case of search - you can't get all the search results, so we have to parse the HTML search results like this: This function will get the search results and parse it returning a clean list of repositories. If you want to get all results use the paging
Google CodeFor code.google.com we can use similar code:
BitbuckedFor Bitbucked this will work nicely:
I've used presented in this article code to make a small Django app - Projects - that aggregates projects for given tags.