naufalnashif commited on
Commit
f756765
·
1 Parent(s): 82e48ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -78,13 +78,14 @@ def scrape_tokped(nama_barang, num_items):
78
  'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
79
  }
80
  timeout = 10
 
81
  try :
 
82
  response = requests.get(url, headers = headers, timeout = timeout)
 
83
  response.raise_for_status()
84
- st.write(response.content)
85
  soup = BeautifulSoup(response.text, 'html.parser')
86
- st.write('----------------------------------------')
87
- st.write(soup)
88
  product_container_list = soup.find_all('a', class_="pcv3__info-content css-gwkf0u", href = True)
89
 
90
  for product_info in product_container_list:
 
78
  'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
79
  }
80
  timeout = 10
81
+ st.write('----------------#0-----------------')
82
  try :
83
+ st.write('----------------#1-----------------')
84
  response = requests.get(url, headers = headers, timeout = timeout)
85
+ st.write('----------------#2-----------------')
86
  response.raise_for_status()
 
87
  soup = BeautifulSoup(response.text, 'html.parser')
88
+ st.write('----------------#3-----------------')
 
89
  product_container_list = soup.find_all('a', class_="pcv3__info-content css-gwkf0u", href = True)
90
 
91
  for product_info in product_container_list: