This file contains 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
#!/usr/bin/env perl | |
use 5.010; | |
use strict; | |
use warnings qw(all); | |
use AnyEvent::HTTP; | |
$AnyEvent::HTTP::MAX_PER_HOST = 24; | |
chomp(my @urls = <DATA>); | |
my $cv = AE::cv; | |
for my $url (@urls) { | |
http_request | |
GET => $url, | |
headers => { 'user-agent' => 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)' }, | |
recurse => 10, | |
timeout => 5, | |
handle_params => { max_read_size => 1024 }, | |
want_body_handle => 1, | |
sub { | |
my ($hdl, $hdr) = @_; | |
if ($hdl and $hdr->{Status} == 200) { | |
$hdl->on_read(sub { | |
my ($_hdl) = @_; | |
my $chunk = $_hdl->rbuf; | |
if ($chunk and $chunk =~ /\xFF\xD8/x) { | |
$cv->send($url); | |
} | |
$_hdl->push_shutdown; | |
}); | |
} | |
}; | |
} | |
say $cv->recv; | |
__DATA__ | |
http://195.235.198.107:3346/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://192.168.1.111:8181/videostream.cgi?user=admin&password=admin | |
http://98.172.23.186:8004/cgi-bin/stream/nph-stream.cgi?id=root&pw=root&streamtype=mjpeg&refresh=15&truenph=1 | |
http://porchcam.ece.utexas.edu:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://200.33.20.193:2000/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://88.53.197.250:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://87.245.83.189:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://87.139.23.123:80/axis-cgi/mjpg/video.cgi?resolution=352x288 | |
http://webcam.st-malo.com:80/axis-cgi/mjpg/video.cgi?resolution=352x288 | |
http://194.17.150.25:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://128.177.29.248:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://65.5.172.234:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://85.105.45.76:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://144.122.47.204:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://61.196.218.1:80/axis-cgi/mjpg/video.cgi | |
http://212.219.113.227:80/axis-cgi/mjpg/video.cgi | |
http://217.23.231.4:80/axis-cgi/mjpg/video.cgi?resolution=320x240&camera=2 | |
http://217.126.89.102:8010/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://www.ttisealivecam.com:80/axis-cgi/mjpg/video.cgi?resolution=352x240 | |
http://62.180.109.233:80/axis-cgi/mjpg/video.cgi | |
http://camera1.mairie-brest.fr:81/mjpg/video.mjpg?resolution=704x576 | |
http://82.188.208.242:80/cgi-bin/mjpg/video.cgi | |
http://82.89.169.171:80/axis-cgi/mjpg/video.cgi?camera=&resolution=320x240 | |
http://pendulumcam2.eng.auburn.edu:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://62.212.113.92:15010/axis-cgi/mjpg/video.cgi?camera=&resolution=480x360 | |
http://81.175.116.204:80/axis-cgi/mjpg/video.cgi?camera=1&resolution=352x288 | |
http://210.236.173.198:80/axis-cgi/mjpg/video.cgi?resolution=352x240 | |
http://213.16.181.191:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://213.199.30.114:80/control/faststream.jpg?stream=full | |
http://www.accu-com.com:802/control/faststream.jpg?stream=full | |
http://leffen10.viewnetcam.com:50000/nphMotionJpeg?Resolution=320x240&Quality=Standard | |
http://68.56.186.81:81/nphMotionJpeg?Resolution=320x240&Quality=Standard | |
http://kamera-pecky.viewnetcam.com:80/nphMotionJpeg?Resolution=320x240&Quality=Standard | |
http://amuzak.miemasu.net:80/nphMotionJpeg?Resolution=320x240&Quality=Standard | |
http://193.138.213.169:80/nphMotionJpeg?Resolution=320x240&Quality=Standard | |
http://amuzak.miemasu.net:60001/nphMotionJpeg?Resolution=320x240&Quality=Standard | |
http://193.138.213.169:8001/nphMotionJpeg?Resolution=320x240&Quality=Standard | |
http://amuzak.miemasu.net:80/nphMotionJpeg?Resolution=320x240&Quality=Standard | |
http://193.138.213.169:80/nphMotionJpeg?Resolution=320x240&Quality=Standard | |
http://amuzak.miemasu.net:80/nphMotionJpeg?Resolution=320x240&Quality=Standard | |
http://7-milemarina.com:80/image | |
http://71.216.181.180:80/image | |
http://125.163.220.233:80/image | |
http://sjmallcam.csbsju.edu:80/getstream.cgi?10&&&&0&0&0&0&0 | |
http://ip-thomasmarina.greatlakescam.com:80/user/cgi-bin/getstream.cgi?10&&&&0&0&0&0&0 | |
http://netwks.com:7092/getstream.cgi?10&&&&0&0&0&0&0 | |
http://71.36.29.110:80/user/cgi-bin/getstream.cgi?10&&&&0&0&0&0&0 | |
http://213.218.26.109:80/stream.jpg | |
http://ycamdenmark1.no-ip.net:8155/stream.jpg | |
http://213.220.119.18:8150/stream.jpg | |
http://195.235.198.107:3344/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://80.34.87.7:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://24.227.114.58:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://194.168.163.96:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://skifunshop.no-ip.com:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://81.252.98.33:6001/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://64.122.208.241:8000/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://160.9.137.11:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://217.173.193.218:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://iris.not.iac.es:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://cam1.rauris.net:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://camera1.jupiterfoundation.org:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://cam-krms.imsys.ru:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://webcam.webtech.ch:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://217.126.89.102:8020/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://cascam.ou.edu:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://80.33.241.154:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://webcam01.lugano.ch:80/axis-cgi/mjpg/video.cgi?resolution=352x288 | |
http://200.242.95.222:1080/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://161.53.120.119:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://83.61.22.4:8080/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://64.89.251.40:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://217.197.157.7:7070/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://webcam1.eldora.com:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://85.46.64.146:80/axis-cgi/mjpg/video.cgi | |
http://85.46.64.147:80/axis-cgi/mjpg/video.cgi?resolution=320x240 | |
http://cam1.plavalaguna.hr:80/record/current.jpg | |
http://mwc.dtdns.net:8150/stream.jpg | |
http://praacam.dyndns.org:80/stream.jpg | |
http://bulvision.no-ip.org:81/stream.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment