Hey im trying to change 2 parts of a string, first is the last char, second in the mid of the string:
*nkw= will be cat: "sport , elec..."
*pgn= 1 , 2, 3, 4 ....
there is 2 loops because i want to run on the first cat , 1...n pages , than go ahead to the next cat - 1...n pages.
thanks!
url_template='https://www.ebay.com/sch/i.html?_nkw=&_pgn='
categories = ["Sport","Electronics","Fashion","Health"]
for cat in categories:
for count in range(0,2):
url = url_template%(cat,count)
print(url)
products = get_index_data(get_page(url))
TypeError: not all arguments converted during string formatting *Also tryied: (cat,(str)count)