jonathanjordan21 commited on
Commit
95deb2f
·
verified ·
1 Parent(s): 006a96f

Update extract.py

Browse files
Files changed (1) hide show
  1. extract.py +3 -3
extract.py CHANGED
@@ -70,7 +70,7 @@ def scrape_vehicle(driver):
70
  for row in all_rows:
71
  if "Pokok" in row.text and "Denda" in row.text and "Total" in row.text:
72
  cols = row.find_elements(By.TAG_NAME, "p")
73
- print(["COLS TOTAL]", cols)
74
  if len(cols) >= 3:
75
  total_tagihan.append({
76
  "pokok": cols[0].text.strip(),
@@ -86,7 +86,7 @@ def scrape_vehicle(driver):
86
  pkb_rows = driver.find_elements(By.CSS_SELECTOR, "#det_pkb .row")[1:] # skip header
87
  for row in pkb_rows:
88
  cols = row.find_elements(By.TAG_NAME, "p")
89
- print(["COLS PKB]", cols)
90
  if len(cols) >= 3:
91
  rincians_pkb.append({
92
  "pokok": cols[0].text.strip(),
@@ -102,7 +102,7 @@ def scrape_vehicle(driver):
102
  swd_rows = driver.find_elements(By.CSS_SELECTOR, "#det_swd .row")[1:] # skip header
103
  for row in swd_rows:
104
  cols = row.find_elements(By.TAG_NAME, "p")
105
- print(["COLS SWD]", cols)
106
  if len(cols) >= 3:
107
  rincians_swd.append({
108
  "pokok": cols[0].text.strip(),
 
70
  for row in all_rows:
71
  if "Pokok" in row.text and "Denda" in row.text and "Total" in row.text:
72
  cols = row.find_elements(By.TAG_NAME, "p")
73
+ print("[COLS TOTAL]", cols)
74
  if len(cols) >= 3:
75
  total_tagihan.append({
76
  "pokok": cols[0].text.strip(),
 
86
  pkb_rows = driver.find_elements(By.CSS_SELECTOR, "#det_pkb .row")[1:] # skip header
87
  for row in pkb_rows:
88
  cols = row.find_elements(By.TAG_NAME, "p")
89
+ print("[COLS PKB]", cols)
90
  if len(cols) >= 3:
91
  rincians_pkb.append({
92
  "pokok": cols[0].text.strip(),
 
102
  swd_rows = driver.find_elements(By.CSS_SELECTOR, "#det_swd .row")[1:] # skip header
103
  for row in swd_rows:
104
  cols = row.find_elements(By.TAG_NAME, "p")
105
+ print("[COLS SWD]", cols)
106
  if len(cols) >= 3:
107
  rincians_swd.append({
108
  "pokok": cols[0].text.strip(),