Permalink
Browse files

Fixed issue with the [More] lnk on a comments page.

  • Loading branch information...
1 parent b32ce86 commit b5387f4278c86016be5a5e5eaf1a4ba4f6108254 @jcla1 committed Oct 7, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/hn2json/parser.rb
View
7 lib/hn2json/parser.rb
@@ -21,7 +21,8 @@ def initialize response
def determine_type
title = @doc.css('.title a')
- if title.length < 1
+
+ if title.length < 1 || title[0].content == "More"
if @doc.css('td').length > 7
return :comment
else
@@ -151,8 +152,6 @@ def get_attrs_discussion entity
end
- #private
-
def get_voting_on table
fulltext = ''
voting_on = ''
@@ -178,7 +177,7 @@ def get_comments
return comments
end
- def get_comments_more doc, comments, flag=false
+ def get_comments_more doc, comments
trs = doc.css('tr .title a')
if trs.length == 0

0 comments on commit b5387f4

Please sign in to comment.