某社区的常用免费图床 free image hosting websites,如何用Ruby与Perl启动浏览器, 打开指定网页
Ruby:
install launchy
gem install launchy
require 'launchy' sites = %w( 33img.com luoimg.com sxotu.com skeimg.com nsaimg.com kanjiantu.com imgbb.com s7tu.com s3tu.com ) sites.each { |x| Launchy.open(x) }
如果是perl:
use v5.30.3; use Browser::Open qw( open_browser ); my @sites = qw( 33img.com luoimg.com sxotu.com skeimg.com nsaimg.com kanjiantu.com imgbb.com s7tu.com s3tu.com ); foreach(@sites) { $_ = "https://www." . $_; #$_开头,必须要有http,否则open_browser报错 sleep (rand(1) * 10) open_browser $_; }
参考:http://stackoverflow.com/questions/8867262/ddg#8867668