afr_load 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7cb1b1a9b4ae65c727b920d48bf19f6411b95066
4
- data.tar.gz: 5207fc38ef56c79c1a7b8be94731117a696e7937
3
+ metadata.gz: 16b8739d189a7d02a7ecb5228420466a0511fa6c
4
+ data.tar.gz: 9dcf4ce82c29cb48ad5fba2d504b290f09cdf440
5
5
  SHA512:
6
- metadata.gz: 2356c23ebde539fea0af7cbcd46e07a4d741704fab4c5cb855925752386b8eb7ba8018eaa4d9175d62af4d3d589cd4ee0cf2d0b04a6802bb836ba07ea7f4b216
7
- data.tar.gz: 3b71c9220a6ec11fdc412146e8fc10dcf4b1162dec13ca1b2dc3a53d6b0fa15365f5a5e8569b0ee97fb6d4e6d6a64de4544029c8e2734deacfccbb9295d38a90
6
+ metadata.gz: 4823a11715f7a0de99f10ad74087f5d2c65446a49361f9fc281f5bfef9a353ac547c35b657b7c622e84d66c9d83dbf6bb394427984b9481c79616b289a4d4d8f
7
+ data.tar.gz: ba33b7992d5bb8510e76c945815307daf1d782934f5ca4e6a292aa7f66014f4013493946426f082106e586036eb40f3028e1b37d1995001ba5ed067593738474
@@ -8,7 +8,7 @@ module AfrLoad
8
8
  def parse(document)
9
9
  month_lineup_doc = get_month_lineup(document)
10
10
  month_lineup_doc.map do |lineup|
11
- parse_month_lineup(lineup)
11
+ parse_month_lineup(lineup).compact
12
12
  end
13
13
  end
14
14
 
@@ -30,7 +30,12 @@ module AfrLoad
30
30
  def parse_month_lineup(contents_child)
31
31
  contents_child.xpath("//div/div[@class='gogo_item']").map do |movie_node|
32
32
  data_block = movie_node.at_xpath("div[contains(@class, 'g_data_block')]")
33
- year_country = data_block.at_xpath("div/span[@class='g_country_year']").text.split("")
33
+ if data_block.at_xpath("h3/span[@class='jp']").text == "放送内容未定"
34
+ puts "放送内容未定"
35
+ next
36
+ end
37
+ year_country = data_block.at_xpath("div/span[@class='g_country_year']")
38
+ year_country = year_country.text.split("◆")
34
39
  performer = data_block.xpath("div/div/div[2]/span[2]").text
35
40
  tv_program = TvProgram.new do |info|
36
41
  #<div class="gogo_item" data-oaStart="2017053113350000" data-oaEnd="2017053115400000">
@@ -1,3 +1,3 @@
1
1
  module AfrLoad
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: afr_load
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - iaia
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-13 00:00:00.000000000 Z
11
+ date: 2017-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler