Last active
August 29, 2015 14:21
-
-
Save yuriteixeira/726975f720e4e5aaf22c to your computer and use it in GitHub Desktop.
Generate skyscanner search urls. To open then, copy and paste the result on openlist chrome extension (https://chrome.google.com/webstore/detail/openlist/nkpjembldfckmdchbdiclhfedcngbgnl?hl=en), like you see here: http://i.imgur.com/oCfY2Wy.jpg
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
<?php | |
// Usage : | |
// php fly.php <start_date> <trip_interval> <variance> <from> <to> | |
// | |
// Eg: A 7 day trip from VIX to STOC, 30 days of variance | |
// php fly.php 2015-07-01 30 "+7 day" vix stoc | |
$start = new \DateTime("{$argv[1]}"); | |
$variance = "+{$argv[2]} day"; | |
$tripInterval = "{$argv[3]}"; | |
$from = "{$argv[4]}"; | |
$to = "{$argv[5]}"; | |
$max = clone $start; | |
$max->modify($variance); | |
$template = "http://www.skyscanner.se/transport/flights/%s/%s/%s/%s\n"; | |
while ($start->modify("+1 day")->getTimestamp() <= $max->getTimestamp()) { | |
$nextDate = clone $start; | |
$nextDate = $nextDate->modify($tripInterval); | |
printf($template, $from, $to, $start->format('ymd'), $nextDate->format('ymd')); | |
} |
Where exactly generating skyscanner search urls is going against their terms & conditions? It doesn't do any crawling (scan), and doesn't copy, index or sort anything, since the user is going to see a regular skyscanner page hosted by skyscanner. As far as I understand, I'm creating traffic for skyscanner for free, nothing else.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using the Skyscanner Services
In consideration of you agreeing to abide by these Terms, we grant you a non-transferable, non-exclusive licence to download, access and use the Skyscanner Services and/or Skyscanner Platforms for your own personal, non-commercial purposes and for no other purpose. In particular, we grant such licence to you subject to you agreeing that you shall not:
(...)
h) use any automated computer program or application to scan, copy, index, sort or otherwise exploit the Skyscanner Services and/or Skyscanner Platforms or any part thereof.
http://www.skyscanner.net/termsofservice.aspx