Skip to content

Commit

Permalink
正在进行【作者评论、作者评论个数】等POST表的数据获取。
Browse files Browse the repository at this point in the history
  • Loading branch information
ysh329 committed Aug 16, 2016
1 parent ace0d11 commit d23edeb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions spider/crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ def getPostDetailInfoDict(self, postUrl):
commentUserNameTagList = postComment.find_all('a', attrs={"href":postDetailInfoDict['postAuthorUrl'], 'class':''})
print len(commentUserNameTagList)
commentUserNameList = commentUserNameTagList#map(lambda tag: tag.a, commentUserNameTagList)

commentContentList = re.findall('<p class="">(.*)</p>', str(postContent))
userNameAndCommentContentList = map(lambda name, comment: (name, comment), commentUserNameList, commentContentList)

Expand Down

0 comments on commit d23edeb

Please sign in to comment.