<?php
|
|
namespace App\Services;
|
|
|
|
use QL\QueryList;
|
|
|
|
class CommonScrapeService {
|
|
|
|
public function scrapeBLImage()
|
|
{
|
|
$sourceUrl = "http://img11.tu11.com:8080/uploads/20201125/202011251846611";
|
|
for ($i = 39; $i < 100; $i++) {
|
|
$content = file_get_contents($sourceUrl . $i . ".jpg");
|
|
file_put_contents("/Users/shixuesen/Pictures/bl/" . pathinfo($sourceUrl . $i . ".jpg", PATHINFO_BASENAME), $content);
|
|
}
|
|
}
|
|
|
|
public function scrapeBeautyLegImage()
|
|
{
|
|
$queryInstance = QueryList::getInstance();
|
|
$content = $queryInstance->get("https://www.v2ph.com/album/z3x469oa.html?hl=en");
|
|
// dump($content);exit;
|
|
$attrs = $content->find("img.img-fluid.album-photo.d-block.mx-auto")->attrs("data-src");
|
|
dump($attrs);
|
|
}
|
|
|
|
}
|