2 Star 1 Fork 0

vForce/extract-39net-disease-sympton-department

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
askCrawler.php 641 Bytes
一键复制 编辑 原始数据 按行查看 历史
<?php
include_once "util.php";
$start = 12010000;
$end = 48226850;
$questions = [];
for ($current = $start; $current <= $end; $current++) {
$url = "http://ask.39.net/question/{$current}.html";
$content = getHTML($url) ?: getHTML($url, false);
preg_match("/病情描述及疑问:<\/strong>(.*)<\/p>/siU", $content, $match);
if (isset($match[1]) && $match[1]) $questions[] = $match[1];
echo "Finished: {$current}/{$end}\n";
}
dumpVariableToFile($questions, "result/questions.php", "questions");
$fp = fopen("result/questions.txt", "w");
foreach ($questions as $question) {
fwrite($fp, "{$question}\n");
}
fclose($fp);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/vforce/extract-39net-disease-sympton-department.git
git@gitee.com:vforce/extract-39net-disease-sympton-department.git
vforce
extract-39net-disease-sympton-department
extract-39net-disease-sympton-department
master

搜索帮助