i'm using the following to call a url , which I need to pass year/month/day as variable while calling it so the final url structure be like
http://mywebiste.com/downloading/main/2016/03/28/'
here is my code ,
import pycurl
import os, sys, re, shutil
import datetime
import time
import requests
import datetime
import logging
import httplib
#logging.basicConfig(level=logging.DEBUG)
httplib.HTTPConnection.debuglevel = 1
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
requests_log = logging.getLogger("requests.packages.urllib3")
requests_log.setLevel(logging.DEBUG)
requests_log.propagate = True
now = datetime.datetime.now()
year = now.year
month = now.month
day = now.day
url = 'http://mywebiste.com/downloading/main/%s/%s/%s/'
r = requests.get(url,timeout=10)
r.text
r.status_code
r.connection.close()