fix: update pkgs

This commit is contained in:
Barrett Ruth 2025-12-07 15:38:56 -06:00
parent 5b43b64401
commit 06f8627331
3 changed files with 1240 additions and 906 deletions

18
script.py Normal file
View file

@ -0,0 +1,18 @@
#!/usr/bin/env python3
from bs4 import BeautifulSoup
from scrapling.fetchers import StealthyFetcher
URL = "https://codeforces.com/contest/1974/problem/A"
page = StealthyFetcher.fetch(
URL,
headless=True,
solve_cloudflare=True,
)
soup = BeautifulSoup(page.html_content, "html.parser")
title = soup.find("div", class_="title")
if title:
print("Page fetched successfully. Problem title:", title.get_text(strip=True))
else:
print("Page fetched but could not find problem title.")