The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

WWW::AzimuthAero::PriceCrawler - Crawler for https://azimuth.aero/

VERSION

version 0.4

SYNOPSIS

    my $azo_price_crawler = WWW::AzimuthAero::PriceCrawler->new();
    $azo_price_crawler->prepare_requests(
      cities => [ 'ROV', 'MOW', 'LED' ],
      only_direct_flights => 1,
      verbose => 1
    )

DESCRIPTION

Wrappper under WWW::AzimuthAero

If you need to use proxy you can easily find them using proxybroker

Just run

  docker run -it nrdhm/proxybroker proxybroker find --types HTTP

and run your script based on WWW::AzimuthAero::PriceCrawler like

  docker-compose run -e MOJO_PROXY=1 -e HTTPS_PROXY='https://200.116.226.210:36964>' ...

METHODS

This module has same methods as WWW::AzimuthAero and some more :

prepare_requests

Return arrray of hashes with params (from, to, date) for WWW::AzimuthAero::get method

    my @l = $azo_price_crawler->prepare_requests( max_date => '18.12.2019', verbose => 1, cities => [ qw/ROV LED/ ] );

In fact, combines "route_map_iata" in WWW::AzimuthAero::RouteMap and "get_schedule_dates" in WWW::AzimuthAero

params

max_date - '%d.%m.%Y' format, if no specified will looks forward for 2 months, default max_date of "get_schedule_dates" in WWW::AzimuthAero

verbose - print amount of "get_schedule_dates" in WWW::AzimuthAero requests and future amount of "get" in WWW::AzimuthAero requests

cities - filter for "route_map_iata" in WWW::AzimuthAero::RouteMap

only_direct_flights - leave only direct flights. Cities considered without direct flights if "get_schedule_dates" in WWW::AzimuthAero has no available_to propery in response

AUTHOR

Pavel Serikov <pavelsr@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2019 by Pavel Serikov.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.