remove the print() for test

This commit is contained in:
yann 2024-11-20 10:15:58 +01:00
parent b74090865e
commit cece9d1874

View File

@ -191,9 +191,6 @@ def main():
# EXTRACTION + TRANSFORMATION
product_data = get_data(page_soup, page_url)
# print(page_soup)
# print(phase1.get_category(page_soup))
# print(phase1.get_data(page_soup, page_url))
# LOAD data in a list
data.append(product_data)
@ -201,7 +198,6 @@ def main():
# PHASE 4 : get img for every book and name it with category and incremental number
# EXTRACT images data -url, title, binary content- and LOAD binary content in a file named with the title
img_url = get_image_url(page_soup, page_url)
print(category, "/", product_data[2], ".png")
with open(category + "/" + product_data[2] + ".png", "wb") as img_file:
img_file.write(requests.get(img_url).content)
img_nb += 1