Getting trending Github projects via YQL
By : Shabda Raaj
Github.com/explore allows you to see the trending Github topics. They use repopular.com for this, which use twitter retweets to find out the popular Github repos.
Since neither Repopular, nor Github have a RSS of these trending repos, I wanted to get a list of these. Here is how easy it is with YQL.
How we do it
-
Go to YQL console. Give the SQL query to get the data from the webpage.
-
where url="repopular.com" and css="div.pad a"is the magic which select the webpage, and also what DOM elemenst we are interested in. -
We get this data in JSON format which is munged to get the list of links.
-
This list of links is passed via
is_github_projectwhich gets me just the Github projects. -
And we are done.
PS. YQL is amazing.
Related Posts
- Two Scoops of Django: Review
- Serving static files in Django
- Logging in Django
- Common testing scenarios for Django app.
- Deploying django using docker
Can we help you build amazing apps? Contact us today.
Hey, cool stuff :)
Just in case you don't check your thread on reddit (I've replied there):
I've just hacked a feed generator on appengine using your YQL! Check it out: http://ghtrends.appspot.com/atom.xml
Source code on Github: github.com/caio/ghtrends