use strict;
use warnings;
use WebService::Browshot;

my $client = WebService::Browshot->new(key => $ENV{BROWSHOT_API_KEY});
my ($status, $content) = $client->simple(url => 'https://example.com/', country => 'in', device => 'iphone_15_pro');
die "Capture failed (HTTP $status)\n" unless $status == 200;
open my $file, '>:raw', 'capture.png' or die $!;
print {$file} $content;
close $file;
