1 parent c5aa144 commit ea15f49Copy full SHA for ea15f49
1 file changed
cxapi/base.py
@@ -128,10 +128,10 @@ def fetch_attachment(self) -> None:
128
html = BeautifulSoup(resp.text, "lxml")
129
130
if r := re.search(
131
- r"window\.AttachmentSetting *= *(.+?);",
+ r"window\.AttachmentSetting *= *(?P<json>.+);",
132
html.head.find("script", type="text/javascript").text,
133
):
134
- self.attachment = json.loads(r.group(1))
+ self.attachment = json.loads(r.group("json"))
135
self.logger.debug(f"Attachment: {self.attachment}")
136
else:
137
if t := html.select_one("p.blankTips"):
0 commit comments