bilibili_sunday 0.0.5 → 0.0.6
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.
@@ -76,17 +76,13 @@ module BilibiliSunday
|
|
76
76
|
def cid_for_video_url(url)
|
77
77
|
doc = Nokogiri::HTML(gzip_inflate(@cacher.read_url(url)))
|
78
78
|
|
79
|
-
doc.
|
80
|
-
res = /cid=([0-9]*)/.match(i.to_s)
|
79
|
+
res = /secure,cid=([0-9]*)/.match(doc.to_s)
|
81
80
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
end
|
81
|
+
if res && res[1]
|
82
|
+
return res[1].to_i
|
83
|
+
else
|
84
|
+
raise "Not a valid Bilibili video page URL. "
|
87
85
|
end
|
88
|
-
|
89
|
-
raise "Not a valid Bilibili video page URL. "
|
90
86
|
end
|
91
87
|
|
92
88
|
def title_for_video_url(url)
|