Commit
·
9f9bdcc
1
Parent(s):
a1b9884
Update app.py
Browse files
app.py
CHANGED
@@ -19,8 +19,6 @@ def scrape_e_commerce(nama_barang, num_items):
|
|
19 |
products = products[:num_items]
|
20 |
break
|
21 |
|
22 |
-
prop = min(len(products) / num_items, 1)
|
23 |
-
my_bar.progress(prop, text=progress_text)
|
24 |
url = f"https://www.klikindomaret.com/search/?key={query}&categories=&productbrandid=&sortcol=&pagesize=54&page={page}&startprice=&endprice=&attributes=&ShowItem="
|
25 |
response = requests.get(url)
|
26 |
soup = BeautifulSoup(response.text, 'html.parser')
|
@@ -53,6 +51,8 @@ def scrape_e_commerce(nama_barang, num_items):
|
|
53 |
'discount_percentage': discount_percentage,
|
54 |
'link': product_link
|
55 |
})
|
|
|
|
|
56 |
|
57 |
page += 1
|
58 |
|
|
|
19 |
products = products[:num_items]
|
20 |
break
|
21 |
|
|
|
|
|
22 |
url = f"https://www.klikindomaret.com/search/?key={query}&categories=&productbrandid=&sortcol=&pagesize=54&page={page}&startprice=&endprice=&attributes=&ShowItem="
|
23 |
response = requests.get(url)
|
24 |
soup = BeautifulSoup(response.text, 'html.parser')
|
|
|
51 |
'discount_percentage': discount_percentage,
|
52 |
'link': product_link
|
53 |
})
|
54 |
+
prop = min(len(products) / num_items, 1)
|
55 |
+
my_bar.progress(prop, text=progress_text)
|
56 |
|
57 |
page += 1
|
58 |
|