Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
webmagic
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
沈俊林
webmagic
Commits
719100d6
Commit
719100d6
authored
Sep 28, 2013
by
yihua.huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update xsoup usage doc
parent
e7657cca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
user-manual.md
user-manual.md
+1
-1
No files found.
user-manual.md
View file @
719100d6
...
@@ -213,7 +213,7 @@ Spider还包括一个方法test(String url),该方法只抓取一个单独的
...
@@ -213,7 +213,7 @@ Spider还包括一个方法test(String url),该方法只抓取一个单独的
webmagic包括一个对于页面正文的自动抽取的类
**SmartContentSelector**
。相信用过Evernote Clearly都会对其自动抽取正文的技术印象深刻。这个技术又叫
**Readability**
。当然webmagic对Readability的实现还比较粗略,但是仍有一些学习价值。
webmagic包括一个对于页面正文的自动抽取的类
**SmartContentSelector**
。相信用过Evernote Clearly都会对其自动抽取正文的技术印象深刻。这个技术又叫
**Readability**
。当然webmagic对Readability的实现还比较粗略,但是仍有一些学习价值。
webmagic的XPath解析使用了作者另一个开源项目:基于Jsoup的XPath解析器
[
Xsoup
](
https://github.com/code4craft/xsoup
)
,Xsoup对XPath的语法进行了一些扩展,支持一些自定义的函数。
webmagic的XPath解析使用了作者另一个开源项目:基于Jsoup的XPath解析器
[
Xsoup
](
https://github.com/code4craft/xsoup
)
,Xsoup对XPath的语法进行了一些扩展,支持一些自定义的函数。
这些函数的使用方式都是在XPath末尾加上
`/name-of-function()`
,例如:
`"//div[@class='BlogStat']/regex('\\d+-\\d+-\\d+\\s+\\d+:\\d+')"`
。
<table>
<table>
<tr>
<tr>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment