New to Python
Trying to scrape some desired info from a webpage. First thing I would like to get is all HTML between today and yesterday's dates. Here is what I have so far
import datetime
import urllib
import re
t = datetime.date.today()
t1 = t.strftime("%B %d, %Y")
y = datetime.date.today() - datetime.timedelta(1)
y1 = y.strftime("%B %d, %Y")
htmlfile = urllib.urlopen("http://www.blu-ray.com/itunes/movies.php?show=newreleases")
htmltext = htmlfile.read()
block1 = re.search(t1 + r'(.*)' + re.escape(y1), htmltext)
print block1
From what I can tell (and I'm probably wrong), my regex should grab what I want it to, so that I can then start pulling out info from today's date only. But it returns 'None'.
I'm sure that it's just my limited understanding as I am new to this but any help would be greatly appreciated. Thanks a lot!