Skip to content

Commit a6df67c

Browse files
fix:添加爬虫处理结果注释,打开文件生成计时
1 parent 40ec1e3 commit a6df67c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

‎scripts/LeetCodeProvider.js

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ module.exports = LeetCodeProvider = {
2020
.load(sHtml)(QUESTION_DOM_SELECTOR)
2121
.each((idx, ele) => titles.push(ele.attribs["title"]));
2222
Logger.success("获取问题列表成功");
23+
/**
24+
* 由于QUESTION_DOM_SELECTOR 所选择的结构包含非问题标签,获取title会是undefined,在此需将其过滤掉
25+
*/
2326
return titles.filter(Boolean).filter((name) => !name.endsWith(ENGLISH_MARKDOWN_SIGN));
2427
})
2528
.catch((error) => {

‎scripts/generateleetcode.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const {
1010

1111

1212
const genertateLeetcodeToJson = () => {
13-
// console.time("genertateLeetcodeToJson");
13+
console.time("genertateLeetcodeToJson");
1414

1515
const rawMarkdowns = Utils.getDirsFileNameSync(
1616
RAW_MARKDOWN_OUTPUT_DIR

0 commit comments

Comments
 (0)