Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix search regex
  • Loading branch information
nghuyong authored Dec 18, 2022
2 parents 010a106 + a51458d commit acd2db7
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_\'\)">复制微博地址</a>', html)
tweet_ids = re.findall(r'\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 acd2db7

Please sign in to comment.