Commit 65da60b8 authored by Michael Rose's avatar Michael Rose

hpff: handle empty author case

parent 750e24ed
......@@ -72,7 +72,13 @@ class IndexHpffMetadata
author_link = first_p.css('a')[1]
author_name = author_link.text
author_id = /showuid=(\d+)/.match(author_link.attr('href'))[1].to_i
author_match = /showuid=(\d+)/.match(author_link.attr('href'))
author_id = -1
if author_match
author_id = author_match[1].to_i
end
pre_story_data = first_p.css('span')[0].text
post_story_data = e.css('span').last.children.to_xml
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment