• 请不要在回答技术问题时复制粘贴 AI 生成的内容
jasamboro
V2EX  ›  程序员

PHP 监控网页内容更新并下载的问题

  •  
  •   jasamboro · May 13, 2020 · 2708 views
    This topic created in 2364 days ago, the information mentioned may be changed or developed.

    我通过 php 获取到网页上的所有链接之后,想筛选出链接地址中含有当日日期的链接要怎么做

    https://www.v2ex.com/ https://www.v2ex.com/2020-05-13/xxxxx.pdf

    例如这样,我想筛出包含了 2020-05-13 的这条链接并下载到本地

    4 replies  •  2020-05-14 18:46:16 +08:00
    hoythan
    hoythan
    PRO
    May 13, 2020
    1
    正则
    tankren
    tankren
    May 13, 2020
    2
    preg_match
    liuxu
    liuxu
    May 13, 2020
    3
    小伙子写爬虫说的这么委婉,xpath 比正则好用
    jasamboro
    jasamboro
    OP
    May 14, 2020 via iPhone
    4
    @liuxu 哈哈,其实就是每天半夜来一趟增量下载
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5661 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 03:08 · PVG 11:08 · LAX 19:08 · JFK 22:08
    ♥ Do have faith in what you're doing.