Home > Backend Development > PHP Tutorial > 关于快讯采集,仅提取频道列表中新增项

关于快讯采集,仅提取频道列表中新增项

WBOY
Release: 2016-06-13 11:10:00
Original
953 people have browsed it

关于新闻采集,仅提取频道列表中新增项
做新闻采集程序,以腾讯的某频道为例“http://tech.qq.com/hlwxw.htm” 。每30分钟上来扫描看看有没有新增新闻,可能上面频道的列表增加了两条,其他23条都是已经抓完的了(一共25条的列表),仅把这两条能出来放进数据库,请问应该怎样做??


------解决方案--------------------
每抓一条新闻,都把那条新闻的id存储在你的表里。比如

exists_id
----------
1231
1232
1233
...


采集的时候,先判断下这条新闻的id是否在你那个表里存在。。。
然后就不用说了
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