import datetime today = (datetime.date.today()).strftime('%Y%m%d')
import datetime yesterday = (datetime.date.today()-datetime.timedelta(days=1)).strftime('%Y%m%d')