sintamar commited on
Commit
dc30aaf
·
verified ·
1 Parent(s): 8f9233b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -21
app.py CHANGED
@@ -62,28 +62,28 @@ def take_webdata(url):
62
  #table_find = div_find.find("table") if div_find else None
63
  rows = soup.find("div", class_="ui-table__row")
64
  data = []
65
- for row in rows:
66
- rank = row.select_one(".tableCellRank")
67
- team = row.select_one(".tableCellParticipant__name")
68
- mp = row.select_one("span.table__cell:nth-of-type(3)")
69
- w = row.select_one("span.table__cell:nth-of-type(4)")
70
- d = row.select_one("span.table__cell:nth-of-type(5)")
71
- l = row.select_one("span.table__cell:nth-of-type(6)")
72
- g = row.select_one(".table__cell--score")
73
- sg = row.select_one(".table__cell--goalsForAgainstDiff")
74
- pts = row.select_one(".table__cell--points")
75
 
76
- data.append({
77
- "Peringkat": rank.text.strip() if rank else "",
78
- "Tim": team.text.strip() if team else "",
79
- "Main": mp.text.strip() if mp else "",
80
- "Menang": w.text.strip() if w else "",
81
- "Seri": d.text.strip() if d else "",
82
- "Kalah": l.text.strip() if l else "",
83
- "Gol": g.text.strip() if g else "",
84
- "Selisih Gol": sg.text.strip() if sg else "",
85
- "Poin": pts.text.strip() if pts else ""
86
- })
87
 
88
  # === 5. Buat DataFrame ===
89
  df = pd.DataFrame(data)
 
62
  #table_find = div_find.find("table") if div_find else None
63
  rows = soup.find("div", class_="ui-table__row")
64
  data = []
65
+ #for row in rows:
66
+ #rank = row.select_one(".tableCellRank")
67
+ #team = row.select_one(".tableCellParticipant__name")
68
+ #mp = row.select_one("span.table__cell:nth-of-type(3)")
69
+ #w = row.select_one("span.table__cell:nth-of-type(4)")
70
+ #d = row.select_one("span.table__cell:nth-of-type(5)")
71
+ #l = row.select_one("span.table__cell:nth-of-type(6)")
72
+ #g = row.select_one(".table__cell--score")
73
+ #sg = row.select_one(".table__cell--goalsForAgainstDiff")
74
+ #pts = row.select_one(".table__cell--points")
75
 
76
+ #data.append({
77
+ #"Peringkat": rank.text.strip() if rank else "",
78
+ #"Tim": team.text.strip() if team else "",
79
+ #"Main": mp.text.strip() if mp else "",
80
+ #"Menang": w.text.strip() if w else "",
81
+ #"Seri": d.text.strip() if d else "",
82
+ #"Kalah": l.text.strip() if l else "",
83
+ #"Gol": g.text.strip() if g else "",
84
+ #"Selisih Gol": sg.text.strip() if sg else "",
85
+ #"Poin": pts.text.strip() if pts else ""
86
+ #})
87
 
88
  # === 5. Buat DataFrame ===
89
  df = pd.DataFrame(data)