url_to_contents 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -3
- data/lib/url_to_contents.rb +0 -2
- data/lib/url_to_contents/models/tudou.rb +6 -0
- data/lib/url_to_contents/models/weibo.rb +6 -0
- data/lib/url_to_contents/models/youku.rb +6 -0
- data/lib/url_to_contents/parser.rb +2 -2
- data/lib/url_to_contents/version.rb +1 -1
- data/url_to_contents.gemspec +3 -0
- metadata +19 -3
data/Gemfile
CHANGED
data/lib/url_to_contents.rb
CHANGED
@@ -13,8 +13,8 @@ module UrlToContents
|
|
13
13
|
|
14
14
|
def youku
|
15
15
|
youku = UrlToContents::Models::Youku.new
|
16
|
-
youku.title = @doc.css('.title a').text
|
17
|
-
youku.content = @doc.css('.body
|
16
|
+
youku.title = @doc.css('.title a,#subtitle').text
|
17
|
+
youku.content = @doc.css('.right .infoArea .body .info:last-child .item:first-child').text
|
18
18
|
@doc.css('#panel_share > .panel_con > .p1 > .item').each do |u|
|
19
19
|
youku.media = u.xpath('input').attr('value').value if u.css('.label').children.text == "flash地址: "
|
20
20
|
end
|
data/url_to_contents.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: url_to_contents
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,8 +9,24 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
13
|
-
dependencies:
|
12
|
+
date: 2012-12-26 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: nokogiri
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 1.5.5
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.5.5
|
14
30
|
description: ! '[""]'
|
15
31
|
email:
|
16
32
|
- skywalker418@gmail.com
|