Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit b5387f4278c86016be5a5e5eaf1a4ba4f6108254 1 parent b32ce86
Joseph Adams authored October 07, 2012

Showing 1 changed file with 3 additions and 4 deletions. Show diff stats Hide diff stats

  1. 7  lib/hn2json/parser.rb
7  lib/hn2json/parser.rb
@@ -21,7 +21,8 @@ def initialize response
21 21
     def determine_type
22 22
       title = @doc.css('.title a')
23 23
 
24  
-      if title.length < 1
  24
+
  25
+      if title.length < 1 || title[0].content == "More"
25 26
         if @doc.css('td').length > 7
26 27
           return :comment
27 28
         else
@@ -151,8 +152,6 @@ def get_attrs_discussion entity
151 152
     end
152 153
 
153 154
 
154  
-    #private
155  
-
156 155
     def get_voting_on table
157 156
       fulltext = ''
158 157
       voting_on = ''
@@ -178,7 +177,7 @@ def get_comments
178 177
       return comments
179 178
     end
180 179
 
181  
-    def get_comments_more doc, comments, flag=false
  180
+    def get_comments_more doc, comments
182 181
       trs = doc.css('tr .title a')
183 182
 
184 183
       if trs.length == 0

0 notes on commit b5387f4

Please sign in to comment.
Something went wrong with that request. Please try again.