crunchyroll 0.9.6.1 → 0.9.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/crunchyroll/crunchyroll.rb +7 -7
- data/lib/crunchyroll/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4070fdc20004799e498cff51927c2bf818b9e239
|
4
|
+
data.tar.gz: cbec9f462e282eb8603a4afbb1cd8d6295cfd06b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53c7e8859c0dea608956a602e714acab359e7a744a6993f44760a53cbeea7225dc7e32dadc41c9979f1b741f61dddff7a3ab2c0835f5fcab6d59a2496ada4c8b
|
7
|
+
data.tar.gz: aa830b63c204a1efd2a22f923a80fd8c0f86708da2f2baf02e97668033cf61f7ee54d8caa9e8e738504b74d457178e498c8dfb96a01fd343c67483fbf5cea208
|
@@ -21,16 +21,16 @@ module Crunchyroll
|
|
21
21
|
class << self
|
22
22
|
|
23
23
|
def find(series, time_zone = 'Rome')
|
24
|
-
url
|
25
|
-
|
26
|
-
cr
|
27
|
-
Nokogiri::HTML(open(cr)).xpath('//a[@class="portrait-element block-link titlefix element-lineup-anime"]').each { |r|
|
24
|
+
title, url = [''] * 2
|
25
|
+
cr = 'http://www.crunchyroll.com/lineup' # TODO: restore some proxy from usa
|
26
|
+
Nokogiri::HTML(open(cr)).xpath('//a[@class="portrait-element block-link titlefix element-lineup-anime"]').each do |r|
|
28
27
|
if r['title'].downcase.include? series.downcase
|
29
28
|
title = r['title']
|
30
29
|
url = r['href' ]
|
31
30
|
break
|
32
31
|
end
|
33
|
-
|
32
|
+
end
|
33
|
+
|
34
34
|
return false if title.empty? || url.empty?
|
35
35
|
|
36
36
|
air = Nokogiri::HTML(open(url)).xpath('//ul[@id="sidebar_elements"]/li').select { |e| e.at_xpath('.//p[@class="strong"]') }[0]
|
@@ -57,7 +57,7 @@ class << self
|
|
57
57
|
tomorrow = Date.tomorrow
|
58
58
|
today = Time.now
|
59
59
|
|
60
|
-
[].tap
|
60
|
+
[].tap do |releases|
|
61
61
|
Nokogiri::HTML(open(url)).xpath('//div[@class="today-releases"]/div[@class="series-name"]').each { |r|
|
62
62
|
title = r.at_xpath('.//child::text()').to_s.squeeze(' ')
|
63
63
|
time = r.at_xpath('.//span').text
|
@@ -82,7 +82,7 @@ class << self
|
|
82
82
|
:left => today.left(date)
|
83
83
|
}
|
84
84
|
}
|
85
|
-
|
85
|
+
end.sort_by { |h| h[:date] }
|
86
86
|
end
|
87
87
|
|
88
88
|
end
|
data/lib/crunchyroll/version.rb
CHANGED