我试图抓住位于here的图像并每天将其保存在我的服务器中几次,就好像我在图像上“右键单击”并保存它在我的桌面上。我已经决定使用perl脚本来做到这一点,这是我写了这么远:抓取图像from.asp url并保存它
use Image::Grab;
$pic->regexp('.*\.png');
$pic->search_url('http://www.reuters.wallst.com/enhancements/chartapi/index_chart_api.asp?symbol=.SPX&headerType=quote&width=316&height=106&duration=3');
$pic->grab;
open(IMAGE, ">index_chart_api.png") || die"index_chart_api.png: $!";
binmode IMAGE; # for MSDOS derivations.
print IMAGE $pic->image;
close IMAGE;
通过ssh运行它后,我收到此错误:无法调用“正则表达式”上的行未定义的值2
任何人都知道这条线有什么问题“$ pic-> regexp('。*。png');”或者如何从正确的服务器上提到的url抓取并保存这张图片(index_chart_api.png)?
感谢任何帮助。
这一个就像一个魅力。非常感谢你。 – user991329