使用 Python 请求时如何修改 url 的一部分?

How can I modify part of a url when using Python Requests?

如何自动增加这个 URL 中的日期?

reportDate = "https://secure.logmeinrescue.com/API/setReportDate.aspx?bdate=06/25/2015&edate=06/23/2015&authcode=secretAuthcode"
setReportDate = requests.get(reportDate)

requests 没有任何 URL 编辑功能。您可以使用 urlparse 手动解析 URL,拆分查询参数,获取日期并使用 datetime 递增它,然后自己重​​建字符串以将其传回请求。