获取网站所有的url正则表达式

mac2022-06-30  16

C# string pattern1 = @"(?is)<[^>]*?src=(['""\s]?)(?<src>[^'""\s]*)\1[^>]*?>"; string pattern2 = @"(?is)<[^>]*?href=(['""\s]?)(?<href>[^'""\s]*)\1[^>]*?>";    python: pattern1 =r"(?<=href=\").+?(?=\")|(?<=href=\').+?(?=\')" pattern2 =r"(?<=src=\").+?(?=\")|(?<=src=\').+?(?=\')"

  

转载于:https://www.cnblogs.com/c-x-a/p/8299235.html

最新回复(0)