Skip to content

Instantly share code, notes, and snippets.

@hippietrail
Created October 18, 2012 17:26
Show Gist options
  • Save hippietrail/3913509 to your computer and use it in GitHub Desktop.
Save hippietrail/3913509 to your computer and use it in GitHub Desktop.
Get Stack Exchange question IDs from Google Search results
$('a.l').map(function(i, e) {
return !e.search ? e.href : (function(s) {
var u = '?';
s.split('&').forEach(function(ee, ii) {
var e = ee.split('=');
if (e[0] == 'url')
u = e[1];
});
return decodeURIComponent(u);
})(e.search);
}).map(function(iii, eee) {
return eee.match(/^[^0-9]+(\d+)/)[1];
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment