Skip to content

Commit

Permalink
Merge pull request #277 from liurundong2021/master
Browse files Browse the repository at this point in the history
fix search.py mblogid extract reg.
  • Loading branch information
nghuyong authored Apr 4, 2023
2 parents acd2db7 + a38bcad commit 47d7578
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion weibospider/spiders/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def parse(self, response, **kwargs):
网页解析
"""
html = response.text
tweet_ids = re.findall(r'\d+/(.*?)\?refer_flag=1001030103_" ', html)
tweet_ids = re.findall(r'weibo\.com/\d+/(.+?)\?refer_flag=1001030103_" ', html)
for tweet_id in tweet_ids:
url = f"https://weibo.com/ajax/statuses/show?id={tweet_id}"
yield Request(url, callback=self.parse_tweet, meta=response.meta)
Expand Down

0 comments on commit 47d7578

Please sign in to comment.