Skip to content

Instantly share code, notes, and snippets.

View pjmavadiya's full-sized avatar

prashant mavadiya pjmavadiya

  • Ahmedabad/Gujarat/India
View GitHub Profile
@pjmavadiya
pjmavadiya / last-modified.py
Created October 20, 2016 09:19
Python : Determine last modified time of a web page
#!/usr/bin/python2.7
import requests
import sys
from urlparse import urlparse
#This will return last modified time of given web page url
def get_last_modified(url):
result = urlparse(url)
if True if [result.scheme, result.netloc, result.path] else False:
header = requests.head(url).headers