naufalnashif commited on
Commit
661ac3e
·
1 Parent(s): 0dfa854

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -93,6 +93,9 @@ def scrape_shopee(nama_barang, num_items):
93
  try :
94
  #driver = webdriver.Chrome(executable_path = path, options = chrome_options)
95
  driver = webdriver.Chrome(options = options)
 
 
 
96
  html = driver.execute_script("return document.getElementsByTagName('html')[0].innerHTML")
97
  soup = BeautifulSoup(html, "html.parser")
98
 
 
93
  try :
94
  #driver = webdriver.Chrome(executable_path = path, options = chrome_options)
95
  driver = webdriver.Chrome(options = options)
96
+ url = f'https://shopee.co.id/search?keyword={query}&page={page}'
97
+ driver.get(url)
98
+ time.sleep(10)
99
  html = driver.execute_script("return document.getElementsByTagName('html')[0].innerHTML")
100
  soup = BeautifulSoup(html, "html.parser")
101