I am currently working on a program to help manage my comic book collection. I want to take the title, issue number, and grade of each comic in its corresponding list and use the values to fill in the f string portions of a url to get last sale data. So far I can only get it to provide a url with the last three entries of each list. Ideally, it would provide three separate urls.
Example:
titles = ['thor', 'deadpool', 'spider-man']
issues = ['6', '19', '50']
grades = ['9.8', '9.8', '9.0']
phrases = []
for ti, iss, gr in zip(titles, issues, grades):
phrases.append(ti)
phrases.append(iss)
phrases.append(gr)
for terms in phrases:
soldurl=f"https://www.ebay.com/sch/900/i.html _from=R40&_nkw={ti}+%23{iss}+{gr}&_sacat=900&Certification=CGC&_dcat=900&rt=nc&LH_Sold=1&LH_Complete=1"
Output:
https://www.ebay.com/sch/900/i.html?_from=R40&_nkw=spider-man+%2350+9.0&_sacat=900&Certification=CGC&_dcat=900&rt=nc&LH_Sold=1&LH_Complete=1