Skip to content

Commit

Permalink
add other conf
Browse files Browse the repository at this point in the history
  • Loading branch information
kaito-kidd committed Mar 21, 2015
1 parent f77dd07 commit 0c2ee57
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,28 @@
]

# 后缀
SUFFIX = "discussion?start=%d"
GROUP_SUFFIX = "discussion?start=%d"

# 抓取前多少页
MAX_PAGE = 10

# 匹配规则
RULES = {
# 每个帖子项
"topic_item": "//table[@class='olt']/tr",
# 列表元素
"title": "td[@class='title']/span/a/@title",
"author": "td[@nowrap='nowrap'][1]/a/text()",
"reply": "td[@nowrap='nowrap'][2]/a/text()",
"last_reply_time": "td[@class='time']/text()",
"url": "td[@class='title']/span/a/@href",
# 帖子详情
"detail_title": "//td[@class='tablecc']/text()|//div[@id='content']/h1/text()",
"create_time": "//span[@class='color-green']/text()",
"detail_author": "//span[@class='from']/a/text()",
"content": "//div[@class='topic-content']/p/text()",
}

# 并发数
POOL_SIZE = 3

Expand Down

0 comments on commit 0c2ee57

Please sign in to comment.