Class: Fushin::Posts::Seesaa

Inherits:
Post
  • Object
show all
Defined in:
lib/fushin/posts/seesaa.rb

Instance Attribute Summary

Attributes inherited from Post

#url

Instance Method Summary collapse

Methods inherited from Post

#btcs, #initialize, #links, #main, #urls, #urls_in_text

Constructor Details

This class inherits a constructor from Fushin::Posts::Post

Instance Method Details

#attachementsObject



14
15
16
17
18
19
20
21
22
# File 'lib/fushin/posts/seesaa.rb', line 14

def attachements
  @attachements ||= doc.css("div.text > a").map do |a|
    url = a.get("href")
    next unless url
    next unless url.include? "seesaa.net/image/"

    Models::Attachment.new url
  end.compact
end

#main_cleanup_selectorsObject



10
11
12
# File 'lib/fushin/posts/seesaa.rb', line 10

def main_cleanup_selectors
  %w(script iframe .listCategoryArticle font)
end

#main_selectorObject



6
7
8
# File 'lib/fushin/posts/seesaa.rb', line 6

def main_selector
  "#content > div.blog > div > div.text"
end