add README.md
This commit is contained in:
		
							
								
								
									
										49
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,49 @@
 | 
				
			|||||||
 | 
					# 微博热搜数据爬取工具
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					> 本仓库中代码仅供学习研究使用,不得用于违法用途。
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 简介
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					您可以将本项目代码部署在服务器上(在本地运行也可),程序会每隔一分钟拉取一次微博热搜数据,并保存为 `json` 格式文件。
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 部署
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					1. 克隆仓库(或直接下载压缩包)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					git clone https://git.only4.work/coder-xiaomo/weibo-hotband
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					2. 安装依赖
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					npm i
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					3. 修改配置文件
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					TODO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					4. 启动项目
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					# 直接运行
 | 
				
			||||||
 | 
					# node index.js
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 使用 pm2
 | 
				
			||||||
 | 
					# pm2 start index.js --name weibo-hotband-bot
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					5. 停止项目
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					# 使用 node index.js 命令直接运行的项目可以通过 `Ctrl + C` 停止
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 使用 pm2 运行的可以使用以下两行命令来停止和从列表中删除项目
 | 
				
			||||||
 | 
					# pm2 stop weibo-hotband-bot
 | 
				
			||||||
 | 
					# pm2 delete weibo-hotband-bot
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 说明
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					TODO
 | 
				
			||||||
		Reference in New Issue
	
	Block a user