How can I modify part of a url when using Python Requests? -
how can automatically increment day in url?
reportdate = "https://secure.logmeinrescue.com/api/setreportdate.aspx?bdate=06/25/2015&edate=06/23/2015&authcode=secretauthcode" setreportdate = requests.get(reportdate)
requests
doesn't have url editing functionality. parse url manually urlparse
, splitting query params, getting date , incrementing datetime
, rebuild string pass requests.
Comments
Post a Comment