jonathanjordan21 commited on
Commit
5a2ef60
·
verified ·
1 Parent(s): e007ef7

Update extract.py

Browse files
Files changed (1) hide show
  1. extract.py +2 -1
extract.py CHANGED
@@ -69,7 +69,8 @@ def scrape_vehicle(driver):
69
  all_rows = driver.find_elements(By.CSS_SELECTOR, "div.row")
70
  for row in all_rows:
71
  print("[ROW TOTAL]", row.text)
72
- if not ("Pokok" in row.text or "Denda" in row.text or "Total" in row.text):
 
73
  cols = row.find_elements(By.TAG_NAME, "p")
74
  print("[COLS TOTAL]", [x.text for x in cols])
75
  if len(cols) >= 4:
 
69
  all_rows = driver.find_elements(By.CSS_SELECTOR, "div.row")
70
  for row in all_rows:
71
  print("[ROW TOTAL]", row.text)
72
+ # if not ("POKOK" in row.text or "DENDA" in row.text or "Total" in row.text):
73
+ if not row.text in ["POKOK", "DENDA", "TOTAL"]:
74
  cols = row.find_elements(By.TAG_NAME, "p")
75
  print("[COLS TOTAL]", [x.text for x in cols])
76
  if len(cols) >= 4: