了解需求
Screenshot_2021-06-03-22-39-46-887_tv.danmaku.bili.jpgScreenshot_2021-06-03-22-40-30-061_tv.danmaku.bili.jpgScreenshot_2021-06-03-22-41-17-170_tv.danmaku.bili.jpgScreenshot_2021-06-03-22-41-55-273_tv.danmaku.bili.jpg分析页面结构

  1. 进入浏览器开发者模式
  2. Screenshot_2021-06-03-22-51-04-889_tv.danmaku.bili.jpgScreenshot_2021-06-03-22-51-24-284_tv.danmaku.bili.jpgxpath路径分析Screenshot_2021-06-03-22-54-24-621_tv.danmaku.bili.jpgScreenshot_2021-06-03-22-55-42-678_tv.danmaku.bili.jpg代码逻辑编写
  • 获取请求头数据

Screenshot_2021-06-03-23-07-19-374_tv.danmaku.bili.jpgScreenshot_2021-06-03-23-08-21-874_tv.danmaku.bili.jpg代码

  1. 初始化,请求头
  2. 请求函数,url构造

Screenshot_2021-06-03-23-08-47-142_tv.danmaku.bili.jpg

  1. 请求函数,url构造

Screenshot_2021-06-03-23-14-54-157_tv.danmaku.bili.jpg

  • 发送请求
  • 解析请求

运行主程序Screenshot_2021-06-03-23-14-19-279_tv.danmaku.bili.jpg

  • 发送请求到当当网,获取数据

Screenshot_2021-06-03-23-21-37-007_tv.danmaku.bili.jpg

Screenshot_2021-06-03-23-26-35-838_tv.danmaku.bili.jpgScreenshot_2021-06-03-23-28-04-887_tv.danmaku.bili.jpgScreenshot_2021-06-03-23-28-31-984_tv.danmaku.bili.jpgScreenshot_2021-06-03-23-29-32-067_tv.danmaku.bili.jpgScreenshot_2021-06-03-23-29-47-516_tv.danmaku.bili.jpgScreenshot_2021-06-03-23-32-01-227_tv.danmaku.bili.jpgScreenshot_2021-06-03-23-33-37-463_tv.danmaku.bili.jpgScreenshot_2021-06-03-23-34-50-731_tv.danmaku.bili.jpg
数据持久化
Screenshot_2021-06-03-23-39-38-720_tv.danmaku.bili.jpg
Screenshot_2021-06-03-23-40-04-195_tv.danmaku.bili.jpgScreenshot_2021-06-03-23-41-32-903_tv.danmaku.bili.jpgScreenshot_2021-06-03-23-42-54-200_tv.danmaku.bili.jpgScreenshot_2021-06-03-23-43-56-923_tv.danmaku.bili.jpg