Skip to content

Commit

Permalink
style: auto format
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 29, 2024
1 parent e884dc4 commit 26993f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/routes/cdu/jwgg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const route: Route = {
};

async function handler() {
const url = 'https://jw.cdu.edu.cn/jwgg.htm';// 数据来源网页(待提取网页)
const url = 'https://jw.cdu.edu.cn/jwgg.htm'; // 数据来源网页(待提取网页)
const response = await got.get(url);
const data = response.data;
const $ = load(data);
Expand All @@ -39,7 +39,7 @@ async function handler() {
.toArray()
.map((e) => {
const element = $(e);
const title = element.find('tr.odd a').text().trim();/* 1.选择器 tr.odd a:这个选择器查找具有 class="odd" 的 <tr> 元素下的 <a> 标签。
const title = element.find('tr.odd a').text().trim(); /* 1.选择器 tr.odd a:这个选择器查找具有 class="odd" 的 <tr> 元素下的 <a> 标签。
2..text():该方法获取选中元素的文本内容。
3..trim():用于去掉字符串前后的空格,确保得到干净的文本。*/
const link = element.find('tr.odd a').attr('href');
Expand Down

0 comments on commit 26993f9

Please sign in to comment.