惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
CERT Recently Published Vulnerability Notes
D
Docker
GbyAI
GbyAI
博客园 - 三生石上(FineUI控件)
博客园_首页
H
Help Net Security
T
The Exploit Database - CXSecurity.com
Microsoft Security Blog
Microsoft Security Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
P
Privacy & Cybersecurity Law Blog
AWS News Blog
AWS News Blog
Spread Privacy
Spread Privacy
F
Full Disclosure
Blog — PlanetScale
Blog — PlanetScale
Y
Y Combinator Blog
V
Vulnerabilities – Threatpost
P
Proofpoint News Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
aimingoo的专栏
aimingoo的专栏
Simon Willison's Weblog
Simon Willison's Weblog
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
S
Security Affairs
T
Tailwind CSS Blog
T
Tor Project blog
W
WeLiveSecurity
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
The Hacker News
The Hacker News
腾讯CDC
M
MIT News - Artificial intelligence
D
DataBreaches.Net
量子位
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
博客园 - 【当耐特】
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
云风的 BLOG
云风的 BLOG
C
Cisco Blogs
I
InfoQ
Engineering at Meta
Engineering at Meta
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CXSECURITY Database RSS Feed - CXSecurity.com
O
OpenAI News
美团技术团队
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
L
LangChain Blog
A
About on SuperTechFans

博客园 - 疯子峰

oracle性能分析2 oracle性能分析 诡异的socket连接失败 ELK配置watcher 多进程 vs 多线程 关于时间 ELK日志平台 Java web项目 wordpress之客户端发布文章 神舟笔记本安装ubuntu 10.10 安装vs2010 AOP, Aspect-oriented programming SPQuery查询语法简要说明(转) - 疯子峰 - 博客园 SPEmailEventReceiver 之导入附件EXCEL 为incoming mail绑定事件,SPEmailEventReceiver 安装Windows 2003更新后导致moss 无法访问 - 疯子峰 Ubuntu 的启动过程概览 linux 全局配置文件 vim 用户配置
获取淘宝商品描述和价格 - 疯子峰 - 博客园
疯子峰 · 2010-12-15 · via 博客园 - 疯子峰

1)价格

(?<=<strong\\s+[^>]*\"J_StrPrice\"\\s+>)(?<1>[^<]*)(?=</strong>) 

2)描述 

分为2步,先获取描述地址,后获取地址内容。 

(?<=')(?<1>http://dsc.taobaocdn.com.*)(?=')

取得地址后url 后,请求 http://dsc.taobaocdn.com/url

(?<=desc=')(?<1>.*)(?=';) 

 代码

 1             Regex reg = new Regex(regExpGoodsDescString);
 2             string tbdescUrl = GetMatchString(reg);
 3             HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(tbdescUrl);
 4             
 5             HttpWebResponse req = (HttpWebResponse)request.GetResponse();
 6             Stream stream = req.GetResponseStream();
 7             StreamReader sr = new StreamReader(stream, Encoding.Default);
 8             string desc = sr.ReadToEnd();
 9 
10             reg = new Regex("(?<=desc=')(?<1>.*)(?=';)", RegexOptions.Singleline | RegexOptions.Compiled);
11             return GetMatchString(reg, desc);