Class: LegendasTV::Subtitle
- Inherits:
-
Object
- Object
- LegendasTV::Subtitle
- Defined in:
- lib/legendas_tv/crawler/subtitle.rb
Constant Summary collapse
- ORIGINAL_TITLE =
0
- TITLE =
1
- RELEASE =
2
- CD_COUNT =
3
- FPS =
4
- MOVIE_SIZE =
5
- DOWNLOAD_COUNT =
6
- FLAG_IMAGE =
7
- ADD_AT =
8
Class Method Summary collapse
Class Method Details
.generate_from_nokogiri(document) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/legendas_tv/crawler/subtitle.rb', line 13 def self.generate_from_nokogiri document attributes = split_base_information document["onmouseover"] document.css("span img").each do |image| attributes.merge! subtitle_image: "#{LegendasTV::BASE_URL}/#{image["src"]}" end document.css("div img").each do |team| attributes.merge! team_image: "#{LegendasTV::BASE_URL}/#{team["src"]}", team_name: team['alt'] end attributes end |