Skip to content

Instantly share code, notes, and snippets.

View SYXiao2002's full-sized avatar

Yixiao Shen SYXiao2002

  • liverpool
View GitHub Profile
@SYXiao2002
SYXiao2002 / TsinghuaCloudAutoDownloading
Created January 8, 2025 04:22
清华大学云盘不能批量下载?
// XPath expression to target specific <a> elements
const xpath = `/html/body/div[1]/div/div[2]/div/table/tbody/tr/td[3]/a`;
// Use document.evaluate to find all nodes matching the XPath expression
let links = document.evaluate(
xpath, // XPath to locate <a> elements
document, // Search within the entire document
null, // No namespace resolver needed
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, // Return an ordered snapshot of matching nodes
null // No initial result context