ci: format
This commit is contained in:
parent
a37e7f2e4a
commit
ff03b932b1
8 changed files with 28 additions and 79 deletions
|
|
@ -8,14 +8,8 @@ from typing import Any, cast
|
|||
import httpx
|
||||
|
||||
from .base import BaseScraper
|
||||
from .models import (
|
||||
ContestListResult,
|
||||
ContestSummary,
|
||||
MetadataResult,
|
||||
ProblemSummary,
|
||||
SubmitResult,
|
||||
TestCase,
|
||||
)
|
||||
from .models import (ContestListResult, ContestSummary, MetadataResult,
|
||||
ProblemSummary, SubmitResult, TestCase)
|
||||
|
||||
BASE_URL = "http://www.usaco.org"
|
||||
HEADERS = {
|
||||
|
|
@ -37,8 +31,7 @@ DIVISION_HEADING_RE = re.compile(
|
|||
re.IGNORECASE,
|
||||
)
|
||||
PROBLEM_BLOCK_RE = re.compile(
|
||||
r"<b>([^<]+)</b>\s*<br\s*/?>.*?"
|
||||
r"viewproblem2&cpid=(\d+)",
|
||||
r"<b>([^<]+)</b>\s*<br\s*/?>.*?" r"viewproblem2&cpid=(\d+)",
|
||||
re.DOTALL,
|
||||
)
|
||||
SAMPLE_IN_RE = re.compile(r"<pre\s+class=['\"]in['\"]>(.*?)</pre>", re.DOTALL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue