1 Star 1 Fork 3

云天河 / curl_pics

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.php 728 Bytes
一键复制 编辑 原始数据 按行查看 历史
云天河 提交于 2018-02-04 14:30 . Initial
<?php
require_once __DIR__ . '/lib/DownLoad.php';
// 如果需要拉取数据
$d = new Download();
$d->her_index = 'https://www.meitulu.com/t/yanni/'; // 她的主页
$d->get_data(); // 获取她首页作品的相关数据
// 读取数据
$page_info_list = file_get_contents(__DIR__.'/datas/data.json'); // 如果现有数据,可以直接读对应数据文件 如 sugar_data.json
// 处理
$list = json_decode($page_info_list , true);
$count = count($list['src']);
for ($i = 0; $i < $count; $i++) {
$d = new Download();
$d->dir = __DIR__ . '/download/';
$d->pages = intval($list['pages'][$i]);
$d->title = $list['title'][$i];
$d->handle($list['src'][$i], 'jpg');
}
echo 'All over' . PHP_EOL;
PHP
1
https://gitee.com/haleyleozhang/curl_pics.git
git@gitee.com:haleyleozhang/curl_pics.git
haleyleozhang
curl_pics
curl_pics
master

搜索帮助