refactor some comments
This commit is contained in:
parent
8213f0849c
commit
c92ce51aa0
@ -41,7 +41,7 @@ def get_category(soup):
|
|||||||
bread = soup.find("ul", class_="breadcrumb").find_all("a")[-1].text
|
bread = soup.find("ul", class_="breadcrumb").find_all("a")[-1].text
|
||||||
return bread
|
return bread
|
||||||
|
|
||||||
#create a list with all information consecutively
|
# create a list with all information consecutively
|
||||||
# /!\ don't know if that's the best way
|
# /!\ don't know if that's the best way
|
||||||
def get_data(soup, url):
|
def get_data(soup, url):
|
||||||
info = [url, product_information(soup)['UPC'],
|
info = [url, product_information(soup)['UPC'],
|
||||||
@ -56,7 +56,7 @@ def get_data(soup, url):
|
|||||||
]
|
]
|
||||||
return info
|
return info
|
||||||
|
|
||||||
#write the file
|
# write the file
|
||||||
def data_output(info, file):
|
def data_output(info, file):
|
||||||
fieldnames = ['product_page_url',
|
fieldnames = ['product_page_url',
|
||||||
'universal_ product_code (upc)',
|
'universal_ product_code (upc)',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user