正则采集问题,求大神帮忙,在线等

WBOY
Release: 2016-06-23 13:51:02
Original
867 people have browsed it

目标页http://www.weather.com.cn/weather1d/101070101.shtml
想得到的值
1. 页面源码第448行,

<p class="updataTime">2014-08-23 07:30更新</p>
Copy after login
的html标签内的值
2. 第586行至730行之间的数据,(哪一天,多少号,天气情况,最高温度与最低温度,风向与风力)一共是7天的数据 

求大神帮忙,正则实在是不会写


回复讨论(解决方案)

可以用PHPQuery,用法类似JQuery


第一个问题的正则式是:

\d{4}-\d{2}-\d{2} \d{2}:\d{2}更新

第二个问题太多,还在看

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!