Skip to content

Instantly share code, notes, and snippets.

@MatthaeusHarris
Created February 6, 2013 02:41
Show Gist options
  • Save MatthaeusHarris/4719779 to your computer and use it in GitHub Desktop.
Save MatthaeusHarris/4719779 to your computer and use it in GitHub Desktop.
app.get("/gamevil/privacy", function(req, res) {
if (cache.privacy && cache.privacy.timestamp > moment().unix() - 3600) {
res.end(cache.privacy.data);
} else {
cache.privacy = {"timestamp": moment().unix()};
http.get("http://us.gamevil.com/news.php?m=policy", function(r) {
var page = "";
r.on('data', function(chunk) {
page += chunk;
});
r.on('end', function() {
cache.privacy.data = $(page).find("#sub_contents").html();
res.end(cache.privacy.data);
});
});
}
});
@MatthaeusHarris
Copy link
Author

Find the WTF!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment