Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nghuyong committed Feb 13, 2024
1 parent 3e4ff97 commit 33d5888
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ python run_spider.py tweet_by_keyword

## 更新日志

- 2024.02: 支持采集视频的播放量 [#315](https://github.com/nghuyong/WeiboSpider/issues/315)
- 2024.01: 支持转发推文溯源到原推文 [#314](https://github.com/nghuyong/WeiboSpider/issues/314)
- 2023.12: 支持采集推文的二级评论 [#302](https://github.com/nghuyong/WeiboSpider/issues/302)
- 2023.12: 支持采集指定时间段的用户推文 [#308](https://github.com/nghuyong/WeiboSpider/issues/308)
Expand Down
2 changes: 2 additions & 0 deletions weibospider/spiders/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ def parse_tweet_info(data):
media_info = data['page_info']['cards'][0]['media_info']
if media_info:
tweet['video'] = media_info['stream_url']
# 视频播放量
tweet['video_online_numbers'] = media_info.get('online_users_number', None)
tweet['url'] = f"https://weibo.com/{tweet['user']['_id']}/{tweet['mblogid']}"
if 'continue_tag' in data and data['isLongText']:
tweet['isLongText'] = True
Expand Down

0 comments on commit 33d5888

Please sign in to comment.