Perl interface to the Pornhub.com API.
WebService::Pornhub - Perl interface to the Pornhub.com API.
use WebService::Pornhub;
my $pornhub = WebService::Pornhub->new;
# Search videos from Pornhub API
my $videos = $pornhub->search(
search => 'hard',
'tags[]' => ['asian', 'young'],
thumbsizes => 'medium',
);
# Response is Array reference, Perl data structures
for my $video (@$videos) {
say $video->{title};
say $video->{url};
}
WebService::Pornhub provides bindings for the Pornhub.com API. This module build with role WebService::Client.
my $pornhub = WebService::Pornhub->new(
timeout => 20, # optional, defaults to 10
logger => Log::Fast->new(...), # optinal, defaults to none
log_method => 'DEBUG', # optional, default to 'DEBUG'
);
Prameters:
10
0
DEBUG
my $videos = $pornhub->search(
search => 'hard',
'tags[]' => ['asian', 'young'],
thumbsizes => 'medium',
);
Parameters:
my $video = $pornhub->get_video(
id => '44bc40f3bc04f65b7a35',
thumbsize => 'medium',
);
Parameters:
my $embed = $pornhub->get_embed_code(
id => '44bc40f3bc04f65b7a35',
);
Parameters:
my $videos = $pornhub->get_deleted_videos(
page => 3,
);
Parameters:
my $active = $pornhub->is_video_active(
is => '44bc40f3bc04f65b7a35',
);
Parameters:
my $categories = $pornhub->get_categories();
There are no parameters for this method.
my $tags = $pornhub->get_tags(
list => 'a',
);
Parameters:
my $stars = $pornhub->get_stars();
There are no parameters for this method.
my $stars = $pornhub->get_stars_detailed();
There are no parameters for this method.
Copyright (C) Yusuke Wada.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
Yusuke Wada yusuke@kamawada.com