Browse Source

add v2ph scrape code

feature/new_bilibili_and_instagram_sxs20191126
nicksxs 5 years ago
parent
commit
e73265874f
2 changed files with 12 additions and 1 deletions
  1. +1
    -1
      app/Console/Commands/CommonTest.php
  2. +11
    -0
      app/Services/CommonScrapeService.php

+ 1
- 1
app/Console/Commands/CommonTest.php View File

@ -42,7 +42,7 @@ class CommonTest extends Command
public function handle() public function handle()
{ {
$commonScrapeService = new CommonScrapeService(); $commonScrapeService = new CommonScrapeService();
$commonScrapeService->scrapeBLImage();exit;
$commonScrapeService->scrapeBeautyLegImage();exit;
dump(FileUtils::scanDuplicateDir("/Volumes/intel660p/image/xg/ycc"));exit; dump(FileUtils::scanDuplicateDir("/Volumes/intel660p/image/xg/ycc"));exit;
$fileService = new FileService(); $fileService = new FileService();
$fileService->segmentFiles("/Volumes/Samsung/weibo/old_image"); $fileService->segmentFiles("/Volumes/Samsung/weibo/old_image");


+ 11
- 0
app/Services/CommonScrapeService.php View File

@ -1,6 +1,8 @@
<?php <?php
namespace App\Services; namespace App\Services;
use QL\QueryList;
class CommonScrapeService { class CommonScrapeService {
public function scrapeBLImage() public function scrapeBLImage()
@ -12,4 +14,13 @@ class CommonScrapeService {
} }
} }
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);
}
} }

Loading…
Cancel
Save