From 868d0eb7127641bdb254cc113a3ae56fdb4d2149 Mon Sep 17 00:00:00 2001 From: NateScarlet Date: Sun, 14 May 2023 14:20:56 +0800 Subject: [PATCH] fix: follow site dom change --- scripts/fetch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/fetch.py b/scripts/fetch.py index 441b774..88b3e4d 100644 --- a/scripts/fetch.py +++ b/scripts/fetch.py @@ -128,7 +128,7 @@ def get_paper(url: str) -> str: _raise_for_status_200(response) response.encoding = "utf-8" soup = bs4.BeautifulSoup(response.text, features="html.parser") - container = soup.find("td", class_="b12c") + container = soup.find(id="UCAP-CONTENT") assert container, f"Can not get paper container from url: {url}" ret = container.get_text().replace("\u3000\u3000", "\n") assert ret, f"Can not get paper content from url: {url}"