Skip to content

Conversation

@songzy12
Copy link
Collaborator

@songzy12 songzy12 commented Sep 20, 2025

#575 的改动之后,get_long_weibo 返回的结果里已不再包含 '原文转发'

从而下面这行里的 wb_content.rfind(u'原文转发') 会永远返回 -1:

weibo_content = wb_content[:wb_content.rfind(u'原文转发')]

现在对于长原创微博和长转发微博,我们可以使用相同的实现了。

同时更新了单元测试和单元测试所使用的数据(来自长转发微博 https://weibo.cn/comment/J5cVGuUNq

Reason: after dataabc#575, there are
actually no '原文转发' in the result of get_long_weibo, thus
wb_content.rfind(u'原文转发') will always return -1. Now we can just use
the same function get_long_weibo for both original weibo and retweets.
@dataabc dataabc merged commit 939a001 into dataabc:master Sep 21, 2025
1 check passed
@dataabc
Copy link
Owner

dataabc commented Sep 21, 2025

已合并,辛苦了。

@songzy12 songzy12 deleted the fix_pytest branch September 21, 2025 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants