Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lincenying/weibo-favorites-spider
微博收藏夹图片爬虫, 利用nodejs+async+ts爬取图片
https://github.com/lincenying/weibo-favorites-spider
async nodejs ts typescript weibo
Last synced: about 2 months ago
JSON representation
微博收藏夹图片爬虫, 利用nodejs+async+ts爬取图片
- Host: GitHub
- URL: https://github.com/lincenying/weibo-favorites-spider
- Owner: lincenying
- Created: 2018-01-21T15:22:55.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-01-21T10:07:39.000Z (12 months ago)
- Last Synced: 2024-01-22T11:08:41.624Z (12 months ago)
- Topics: async, nodejs, ts, typescript, weibo
- Language: TypeScript
- Homepage:
- Size: 143 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 微博收藏夹图片爬虫
#### 1. 新建images图片文件夹
#### 2. 新建config文件夹
#### 3. 在config文件夹下新建index.js文件
内容如下:
```javascript
// https://m.weibo.cn 登录后的cookies
exports.cookies = ''
// https://m.weibo.cn/ => 打开控制台,
// 输入 document.querySelector('.main-top').__vue__.tabs[0].children.find(item => item.name ==='我的收藏').gid
// 得到的即为containerid
exports.containerid = ''
// https://weibo.com 登录后的cookies, 需要web版的cookies主要是为了下载超过9张的图片, 移动版没有找到这个接口
exports.webCookies = ''
```#### 4. 自行根据需要修改`app.js`里的`startPage`(开始页数)和`endPage`(结束页数)
```bash
pnpm install
#or
npm installnpm run dev
#or
pnpm dev
```