Mobafire League of Legends Build Guides Mobafire League of Legends Build Guides
's Forum Avatar

This Weeks Free Champions - Cron Jobs

Creator: Ugleh September 22, 2012 6:45am
Ugleh's Forum Avatar
Sep 13th, 2012
Permalink | Quote | PM | +Rep | Commend September 22, 2012 6:45am | Report
To remove the load of work on myself I usually try to find whatever content i can do automatically through cron jobs. So i came up with this idea for Mobafire. Each week you can grab the free weekly champs by Screen Scrapping.
You could use curl or simply file_get_contents to grab the source from
Screen scrap to find the first appearence of this text
<a href="/news/new-free-champion-rotation-season-two-week-43" title="Read the rest of New
<a href="*" title="Read the rest of New
Which now gives you the full article of the latest new champions. Then you screen scrap that link to get each champion. You will want to do this every tuesday morning or monday evening.
Matt's Forum Avatar
Show more awards
Dec 8th, 2009
Permalink | Quote | PM | +Rep | Commend October 2, 2012 1:45pm | Report
Unfortunately scraping a page like that, which is probably manually written each time by a person at Riot, especially in this case, is unreliable and awkward :( If they provided any form of API we could but, alas.

We have a number of people with access to update it though, and in the past they have been very on-the-ball. If you feel the rotation is too slow to update let us know :)

You need to log in before commenting.