https://github.com/yelexin/english-words-notes
批量查询英语单词。将一个文件中(一行一个)的英文单词批量查询其释义、音标、例句等内容,内容来源有道词典柯林斯词典。使用无头浏览器。
https://github.com/yelexin/english-words-notes
dictionary english-learning
Last synced: 3 months ago
JSON representation
批量查询英语单词。将一个文件中(一行一个)的英文单词批量查询其释义、音标、例句等内容,内容来源有道词典柯林斯词典。使用无头浏览器。
- Host: GitHub
- URL: https://github.com/yelexin/english-words-notes
- Owner: yelexin
- License: mit
- Created: 2018-08-20T02:55:58.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-20T03:08:18.000Z (about 7 years ago)
- Last Synced: 2025-04-19T09:51:12.536Z (6 months ago)
- Topics: dictionary, english-learning
- Language: JavaScript
- Homepage:
- Size: 319 KB
- Stars: 22
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### 运行效果
#### 使用前
#### 使用后
### 本程序可以做什么
将成批的英语单词从词典中查出释义、音标、例句等内容### 如何使用
在程序目录下创建 words.txt,内容为需要查询的英语单词,一行一个。
node index.js查询结果将在 new.txt 中给出
### 注意事项
本程序使用无头浏览器在有道词典中查询,查询的内容为柯林斯词典内容。使用了最简单的实现方式(注意不是最好),实现方式效率较低,查询可能花费时间较长。输出的 new.txt 中的换行符为 `\n` 而不是 `\r\n`。words.txt 中的换行符无所谓,程序会将其中的`\r`删掉。如果结果 new.txt 无法正常显示换行符,windows 用户请自行转换
本程序可能最近不会更新
### 为什么不直接用 get 请求做爬虫?
get 到的释义结果页面 html 中存在大量空白字符,处理较为麻烦。不如 innerText 来的快。