I need to pass different values to the url, as you can see in the example, first I pass the values contained in dt_3, the problem is that I need to pass the rest of the values to all the url, that is, dt_7 and dt_31.
How can I simplify the process without having to repeat the urls for dt_7 and dt_31 and then all the urls should be contained in a list, the urls do not have the same format.
Thanks
from datetime import date, timedelta
dt_3 = date.today() + timedelta(3)
dt_7 = date.today() + timedelta(7)
dt_31 = date.today() + timedelta(31)
Salta_Centro= 'https://www.rentalcars.com/SearchResults.do?country=Argentina&doYear={0}&doFiltering=true \
&dropFtsSearch=L&doDay={1}&searchType=allareasgeosearch&filterFrom=0&puMonth={2}&dropFtsInput=salta&dropCountry=Argentina \
&dropLongitude=-65.4167&puDay={3}&dropFtsLocationSearch=161&puHour=10&dropFtsEntry=22776&enabler=&distance=10 \
&dropFtsLocationName=Salta&dropCountryCode=&doMinute=0&countryCode=&puYear={4}&locationName=&puMinute=0&ftsInput=salta \
&ftsLocationName=Salta&ftsSearch=L&location=161&doMonth={5}&reducedCategory=medium&filterAdditionalInfo=&advSearch=&exSuppliers=&ordering=price' \
.format(dt_3.year,dt_3.day,date.today().month,date.today().day,date.today().year,dt_3.today().month,).replace(' ','')
Mendoza_Centro = 'https://www.rentalcars.com/SearchResults.do?country=Argentina&doYear={0}&doFiltering=true \
&dropFtsSearch=L&doDay={1}&searchType=allareasgeosearch&filterFrom=0&puMonth={2}&dropFtsInput=Mendonza&dropCountry=Argentina \
&dropLongitude=-68.843&puDay={3}&dropFtsLocationSearch=106&puHour=10&dropFtsEntry=22776&enabler=&distance=10 \
&dropFtsType=C&ftsAutocomplete=Mendoza%2c+Mendoza%2c+Argentina&driversAge=30&dropFtsAutocomplete=Mendoza%2c+Mendoza%2c+Argentina \
&dropFtsLocationName=Mendoza&dropCountryCode=&doMinute=0&countryCode=&puYear={4}&locationName=&puMinute=0&ftsInput=Mendoza \
&ftsLocationName=Mendoza&ftsSearch=L&location=106&doMonth={5}&reducedCategory=medium&filterAdditionalInfo=&advSearch=&exSuppliers=&ordering=price' \
.format(dt_3.year,dt_3.day,date.today().month,date.today().day,date.today().year,dt_3.today().month,).replace(' ','')
Tucuman_Centro = 'https://www.rentalcars.com/SearchResults.do?country=Argentina&doYear={0}&doFiltering=true \
&dropFtsSearch=L&doDay={1}&searchType=allareasgeosearch&filterFrom=0&puMonth={2}&dropFtsInput=tucuman&dropCountry=Argentina \
&puDay={3}&dropFtsLocationSearch=-1&puHour=10&dropFtsEntry=22776&enabler=&distance=10 \
&dropFtsLocationName=Tucum%C3%A1n&dropCountryCode=&doMinute=0&countryCode=&puYear={4}&locationName=&puMinute=0&ftsInput=tucuman \
&ftsLocationName=Tucum%C3%A1n&ftsSearch=L&location=-1&doMonth={5}&reducedCategory=medium&filterAdditionalInfo=&advSearch=&exSuppliers=&ordering=price' \
.format(dt_3.year,dt_3.day,date.today().month,date.today().day,date.today().year,dt_3.today().month,).replace(' ','')
buenos_aires = 'https://www.rentalcars.com/SearchResults.do?country=Argentina&doYear={0}&doFiltering=true \
&dropFtsSearch=L&doDay={1}&searchType=allareasgeosearch&filterFrom=0&puMonth={2}&dropFtsInput=buenos+aires&dropCountry=Argentina \
&dropLongitude=-58.3816&puDay={3}&dropFtsLocationSearch=51&puHour=10&dropFtsEntry=22776&enabler=&distance=10 \
&dropFtsLocationName=Buenos+Aires&dropCountryCode=&doMinute=0&countryCode=&puYear={4}&locationName=&puMinute=0&ftsInput=buenos+aires \
&ftsLocationName=Buenos+Aires&ftsSearch=L&location=51&doMonth={5}&reducedCategory=medium&filterAdditionalInfo=&advSearch=&exSuppliers=&ordering=price' \
.format(dt_3.year,dt_3.day,date.today().month,date.today().day,date.today().year,dt_3.today().month,).replace(' ','')
urlList = [Salta_Centro,Mendoza_Centro,Tucuman_Centro,buenos_aires]