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

推荐订阅源

云风的 BLOG
云风的 BLOG
C
Cyber Attacks, Cyber Crime and Cyber Security
Recent Announcements
Recent Announcements
爱范儿
爱范儿
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Security Latest
Security Latest
J
Java Code Geeks
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Cisco Talos Blog
Cisco Talos Blog
Apple Machine Learning Research
Apple Machine Learning Research
C
Check Point Blog
T
Threat Research - Cisco Blogs
I
Intezer
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
WordPress大学
WordPress大学
Engineering at Meta
Engineering at Meta
腾讯CDC
Google DeepMind News
Google DeepMind News
Project Zero
Project Zero
T
Tenable Blog
V
Visual Studio Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Spread Privacy
Spread Privacy
GbyAI
GbyAI
T
Tailwind CSS Blog
P
Palo Alto Networks Blog
Microsoft Security Blog
Microsoft Security Blog
Scott Helme
Scott Helme
Hugging Face - Blog
Hugging Face - Blog
NISL@THU
NISL@THU
Blog — PlanetScale
Blog — PlanetScale
G
GRAHAM CLULEY
K
Kaspersky official blog
T
The Exploit Database - CXSecurity.com
S
Schneier on Security
P
Proofpoint News Feed
S
SegmentFault 最新的问题
P
Proofpoint News Feed
P
Privacy & Cybersecurity Law Blog
The Hacker News
The Hacker News
博客园 - 【当耐特】
Cyberwarzone
Cyberwarzone
L
LangChain Blog
Stack Overflow Blog
Stack Overflow Blog
V
Vulnerabilities – Threatpost
H
Help Net Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Last Week in AI
Last Week in AI
博客园 - 叶小钗

博客园 - 疯子峰

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);