It would certainly be possible to whip together something in Python to query a URL to see when it was last modified, using the HTTP headers, but I wondered if there is an existing tool that can do that for me? I'd imagine something like:
% checkurl http://unix.stackexchange.com/questions/247445/ Fri Dec 4 16:59:28 EST 2015 or maybe:
% checkurl "+%Y%m%d" http://unix.stackexchange.com/questions/247445/ 20151204 as a bell and/or whistle. I don't think that wget or curl have what I need, but I wouldn't be surprised to be proven wrong. Is there anything like this out there?
curl --head urlseems to report the headers to me. Assuming aLast-Modifiedheader does come through,curl --header url | awk '/Last-Modified/{print $2}'should be able to extract the valueLast-Modifiedheaders are completely useless on many sites because the pages are generated dynamically from a database and will always return a LM header of approximately now. This is often done deliberately as a cache-busting technique and to force re-fetches (and thus marketable page views) when the client requests the page with an If-Modified-Since request header.