- use Mojo::DOM;
- use File::Slurp;
-
- my $html = read_file( "a.htm" );
- my $dom = Mojo::DOM->new( $html );
-
- grep { print $_->attr("data-original"), "\n" } ( $dom->find("img")->each );
复制代码
/upload/externalpic/1214218/1214218_20170827123754_9480.jpg
/upload/externalpic/1214218/1214218_20170827123754_5111.jpg
/upload/externalpic/1214218/1214218_20170827123754_4181.jpg
/upload/externalpic/1214218/1214218_20170827123754_8536.jpg
/upload/externalpic/1214218/1214218_20170827123754_2145.jpg
/upload/externalpic/1214218/1214218_20170827123754_4315.jpg
/upload/externalpic/1214218/1214218_20170827123755_5113.jpg
/upload/externalpic/1214218/1214218_20170827123755_7621.jpg
/upload/externalpic/1214218/1214218_20170827123755_2878.jpg
/upload/externalpic/1214218/1214218_20170827123755_9000.jpg
/upload/externalpic/1214218/1214218_20170827123755_605.jpg
/upload/externalpic/1214218/1214218_20170827123755_8239.jpg
/upload/externalpic/1214218/1214218_20170827123756_5145.jpg
/upload/externalpic/1214218/1214218_20170827123756_3003.jpg
/upload/externalpic/1214218/1214218_20170827123756_6521.jpg
/upload/externalpic/1214218/1214218_20170827123756_9915.jpg
/upload/externalpic/1214218/1214218_20170827123756_2703.jpg
/upload/externalpic/1214218/1214218_20170827123757_1357.jpg
/upload/files/2017/08/20/1503223004634.jpg
/upload/files/2017/08/20/1503223032210.jpg
/upload/files/2017/08/20/1503223054641.jpg |