bump python version, ruff check

This commit is contained in:
2026-02-10 14:33:54 +01:00
parent 639afe9b95
commit 2e5cda6689
70 changed files with 2946 additions and 1858 deletions

View File

@@ -48,8 +48,8 @@ class Catalogue:
log.info(f"Searching for term: {searchterm}")
links = self.get_book_links(searchterm)
# debug: links
# print(links)
# debug: links
# print(links)
for elink in links:
result = self.search(elink)
# in result search for class col-xs-12 rds-dl RDS_LOCATION
@@ -167,16 +167,16 @@ class Catalogue:
# based on PPN, get title, people, edition, year, language, pages, isbn,
link = f"https://rds.ibs-bw.de/phfreiburg/opac/RDSIndexrecord/{ppn}"
result = self.search(link)
soup = BeautifulSoup(result, "html.parser")
BeautifulSoup(result, "html.parser")
def get_ppn(self, searchterm: str) -> str | None:
links = self.get_book_links(searchterm)
ppn = None
for link in links:
result = self.search(link)
soup = BeautifulSoup(result, "html.parser")
# debug: link
# print(link)
BeautifulSoup(result, "html.parser")
# debug: link
# print(link)
ppn = link.split("/")[-1]
if ppn and regex.match(r"^\d{8,10}[X\d]?$", ppn):
return ppn
@@ -268,8 +268,8 @@ class Catalogue:
# Find the signature for the entry whose location mentions "Semesterapparat"
for g in groups:
# debug: group contents
# print(g)
# debug: group contents
# print(g)
loc = g.get("location", "").lower()
if "semesterapparat" in loc:
signature = g.get("signature")