remove the print() for test
This commit is contained in:
parent
b74090865e
commit
cece9d1874
@ -191,9 +191,6 @@ def main():
|
|||||||
|
|
||||||
# EXTRACTION + TRANSFORMATION
|
# EXTRACTION + TRANSFORMATION
|
||||||
product_data = get_data(page_soup, page_url)
|
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
|
# LOAD data in a list
|
||||||
data.append(product_data)
|
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
|
# 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
|
# 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)
|
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:
|
with open(category + "/" + product_data[2] + ".png", "wb") as img_file:
|
||||||
img_file.write(requests.get(img_url).content)
|
img_file.write(requests.get(img_url).content)
|
||||||
img_nb += 1
|
img_nb += 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user