Browse Source

fix: follow site dom change

NateScarlet 2 years ago
parent
commit
868d0eb712
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scripts/fetch.py

+ 1 - 1
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}"