Created
September 9, 2013 17:52
-
-
Save dergachev/6499119 to your computer and use it in GitHub Desktop.
Extract a comma-separated list destinations from https://www.google.ca/search?q=direct+flights+from+TLV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//run this code after going to https://www.google.ca/search?q=direct+flights+from+TLV | |
var links = document.querySelectorAll('div.std a.l'); // the selector might need to be tweaked?? | |
var destinations = []; | |
for (var i = 0; i < links.length; ++i) { | |
var item = links[i]; | |
item = item.href.replace(/^.*to\+/,'').replace(/&.*/,''); | |
destinations.push(item); | |
} | |
console.log(destinations.join(",")); | |
// now paste this into multi-destination search at http://matrix.itasoftware.com/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment