refactor: enhance Optuna backtesting framework, optimize orderbook filtering, and update database management utilities.
This commit is contained in:
23
scratch/check_bs4.py
Normal file
23
scratch/check_bs4.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from bs4 import BeautifulSoup
|
||||
import sys
|
||||
|
||||
with open("templates/backtest.html", "r", encoding="utf-8") as f:
|
||||
html = f.read()
|
||||
|
||||
soup = BeautifulSoup(html, "html.parser")
|
||||
tab = soup.find(id="tab-tail")
|
||||
if not tab:
|
||||
print("tab-tail not found!")
|
||||
sys.exit(1)
|
||||
|
||||
print("tab-tail children count:", len(list(tab.children)))
|
||||
card = tab.find(class_="card")
|
||||
if card:
|
||||
print("card found in tab-tail")
|
||||
print("card text length:", len(card.text))
|
||||
else:
|
||||
print("card NOT found in tab-tail!")
|
||||
|
||||
# Print the IDs of all tabs to see if any are swallowed
|
||||
tabs = soup.find_all(id=lambda x: x and x.startswith("tab-"))
|
||||
print("Found tabs:", [t.get('id') for t in tabs])
|
||||
Reference in New Issue
Block a user