http://qs321.pair.com?node_id=11113399


in reply to Finding dates from web pages

Can you get what you want just from doing a HEAD on the web page? That would give you the Last Updated date, I think. I'm not sure if that's exactly what you want.

Alex / talexb / Toronto

Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

Replies are listed 'Best First'.
Re^2: Finding dates from web pages
by cormanaz (Deacon) on Feb 25, 2020 at 20:39 UTC
    That works for some pages that have known meta fields like pubdate or time, but many web pages don't use them. I think the Python library applies some heuristics in such cases.

      "I think the Python library applies some heuristics in such cases"

      You could look at the Python code and implement the same thing in perl. Let me know if you get stuck.

        Looking at the code, that would appear to be quite an undertaking. It turns out it can be installed and run from the command line, so I will probably just go that route, though it will slow things down to load it every time it needs to be run.