Skip to content

Commit

Permalink
fix: 修复文档图片链接失效的问题
Browse files Browse the repository at this point in the history
Issue #630
  • Loading branch information
dataabc committed Jan 4, 2025
1 parent c683881 commit 44b840e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/cookie.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

1. 用Chrome打开<https://passport.weibo.cn/signin/login>
2. 输入微博的用户名、密码,登录,如图所示:
![weibo log in page](https://picture.cognize.me/cognize/github/weibospider/cookie1.png)
![weibo log in page](https://github.com/dataabc/media/blob/master/weiboSpider/images/cookie1.png)
登录成功后会跳转到<https://m.weibo.cn>;
3. 按F12键打开Chrome开发者工具,在地址栏输入并跳转到<https://weibo.cn>,跳转后会显示如下类似界面:
![chrome debugger network tab](https://picture.cognize.me/cognize/github/weibospider/cookie2.png)
![chrome debugger network tab](https://github.com/dataabc/media/blob/master/weiboSpider/images/cookie2.png)
4. 依此点击Chrome开发者工具中的Network->Name中的weibo.cn->Headers->Request Headers,"Cookie:"后的值即为我们要找的cookie值,复制即可,如图所示:
![cookie in request headers section](https://picture.cognize.me/cognize/github/weibospider/cookie3.png)
![cookie in request headers section](https://github.com/dataabc/media/blob/master/weiboSpider/images/cookie3.png)
8 changes: 4 additions & 4 deletions docs/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ $ python3 -m weibo_spider

*1669879400.csv*

![](https://picture.cognize.me/cognize/github/weibospider/weibo_csv.png)
![](https://github.com/dataabc/media/blob/master/weiboSpider/images/weibo_csv.png)

## txt结果文件如下所示

*1669879400.txt*

![](https://picture.cognize.me/cognize/github/weibospider/weibo_txt.png)
![](https://github.com/dataabc/media/blob/master/weiboSpider/images/weibo_txt.png)

json文件包含迪丽热巴的用户信息和上千条微博信息,内容较多。为了表达清晰,这里仅展示两条微博。

Expand Down Expand Up @@ -104,15 +104,15 @@ json文件包含迪丽热巴的用户信息和上千条微博信息,内容较

*img文件夹*

![](https://picture.cognize.me/cognize/github/weibospider/img.png)
![](https://github.com/dataabc/media/blob/master/weiboSpider/images/img.png)

本次下载了793张图片,大小一共1.21GB,包括她原创微博中的图片和转发微博转发理由中的图片。图片名为yyyymmdd+微博id的形式,若某条微博存在多张图片,则图片名中还会包括它在微博图片中的序号。若某张图片因为网络等原因下载失败,程序则会以“weibo_id:pic_url”的形式将出错微博id和图片url写入同文件夹下的not_downloaded.txt里;

## 下载的视频如下所示

*video文件夹*

![](https://picture.cognize.me/cognize/github/weibospider/video.png)
![](https://github.com/dataabc/media/blob/master/weiboSpider/images/video.png)

本次下载了70个视频,是她原创微博中的视频,视频名为yyyymmdd+微博id的形式。其中有一个视频因为网络原因下载失败,程序将它的微博id和视频url以“weibo_id:video_url”的形式写到了同文件夹下的not_downloaded.txt里。

Expand Down
4 changes: 2 additions & 2 deletions docs/userid.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## 如何获取user_id

1. 打开网址<https://weibo.cn>,搜索我们要找的人,如"迪丽热巴",进入她的主页;
![user home](https://picture.cognize.me/cognize/github/weibospider/user_home.png)
![user home](https://github.com/dataabc/media/blob/master/weiboSpider/images/user_home.png)
2. 按照上图箭头所指,点击"资料"链接,跳转到用户资料页面;
![user info](https://picture.cognize.me/cognize/github/weibospider/user_info.png)
![user info](https://github.com/dataabc/media/blob/master/weiboSpider/images/user_info.png)

如上图所示,迪丽热巴微博资料页的地址为"<https://weibo.cn/1669879400/info>",其中的"1669879400"即为此微博的user_id。

Expand Down

0 comments on commit 44b840e

Please sign in to comment.