I am creating a searching system in a personal website. I have a database with a list of products, and for each product i would like to search it on the website by the requests module.
The main link is: "https://website.com/search/album?uid=1&q="
Example:
I am looking for Iphone 12 256 GB. The link should be: https://website.com/search/album?uid=1&q=Iphone+12+256+GB.
I've started just defing the main variable:
main_link = "https://website.com/search/album?uid=1&q="
product_name = "Iphone 12 256 GB"
product_name_to_search = product_name.split()
for product_word in product_name_to_search:
main_link + str(product_word)
Frankly, i dont know how to go on.