"; } function get_links($content) { //这里只提取class="subject_link thread-old"的链接,可以根据需要修改 $pattern = '/(.*?)<\/a>/i'; preg_match_all($pattern, $content, $m); return $m; } ?>
上一篇:python3.7 ImportError: No module named _ssl 解决方法
下一篇:Python 爬虫之数据解析模块lxml基础(附:xpath和解析器介绍)