yt_util 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 059abccfce7627fa2a506baccb0d2f62f70a80a2
4
- data.tar.gz: 31ff588d17835b0f6cb87bc23362892964ce4676
3
+ metadata.gz: d045861cc1212a62f8a57905620fdc0a7d584f87
4
+ data.tar.gz: 4c63d356bc7cd103036e640fbff331d5ae12f81f
5
5
  SHA512:
6
- metadata.gz: 4b977c8c126e499ccd1d4a3f4e79e9c1dcf5f915e2f2582dbb2e842b00be1e016f522c0da1e6087ddf1bc906d31b178ee4bf11074b46f8ac83737bea558fc91f
7
- data.tar.gz: 9bad9170264b3077a6ba5e77f86db694bbed07744b51bddf1c828447a495f3fe7d3ee921ef9c820f583f8512aaf9c7c1179ea03b6db00e03eaebccd9cd01d063
6
+ metadata.gz: 95796161c24f03581c78a6ba35afe53a75fb3942d1f9cf6deaaa4599f30725431dc67291f512e4b6e06aea300cc3fff017ff1d52a9a230a6dbd40c01bf33254b
7
+ data.tar.gz: 35fc63fb67428dfe1560a9aff203b42795bae7a5e923a448dfde50f9437d0d2285499f34d4a2df838b1be92aa10c4668f527944c8d6b895ef989a2b09582d35e
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Youtube Utility
2
+ [![Gem Version](https://badge.fury.io/rb/yt_util.svg)](http://badge.fury.io/rb/yt_util)
2
3
 
3
4
  General purpose toolbox for working with Youtube.
4
5
 
@@ -23,6 +24,8 @@ YtUtil::Scrape.video_stats(video_code = nil, &qry)
23
24
  YtUtil::Scrape.raw_user_stats(username)
24
25
  YtUtil::Scrape.user_stats(username = nil, &qry)
25
26
  YtUtil::URL.generate(video_code, options = {})
27
+ YtUtil::URL.request(web_request)
28
+ YtUtil::GooglePlus.get_username(youtube_username)
26
29
  ```
27
30
 
28
31
  ## NOTE
@@ -0,0 +1,11 @@
1
+ module YtUtil
2
+ module Channel
3
+ module URL
4
+ def self.play_all(username)
5
+ result = YtUtil::URL.request("https://www.youtube.com/user/#{username}")
6
+ result = try { result.css('a.play-all-icon-btn').first.attributes["href"].value }
7
+ result ? "https://www.youtube.com".concat(result) : nil
8
+ end
9
+ end
10
+ end
11
+ end
@@ -97,6 +97,7 @@ module YtUtil
97
97
  }.inject(:update)}
98
98
 
99
99
  {
100
+ image: try { query_result.css('.channel-header-profile-image').first.attributes["src"].value },
100
101
  description: try {query_result.css('.about-description').css('p').text},
101
102
  link: try {query_result.css('a[title="Google+"]')[0]["href"]},
102
103
  views: try {views_n_subs["views"]},
@@ -1,3 +1,3 @@
1
1
  module YtUtil
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
data/lib/yt_util.rb CHANGED
@@ -4,6 +4,7 @@ require "nokogiri"
4
4
  require "mechanize"
5
5
  require "yt_util/version"
6
6
  require "yt_util/scrape"
7
+ require "yt_util/channel"
7
8
  require "yt_util/google_plus"
8
9
  require "yt_util/url"
9
10
  require "yt_util/try"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yt_util
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel P. Clark
@@ -14,70 +14,70 @@ dependencies:
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.6'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: nokogiri
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.6'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.6'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: mechanize
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '2.7'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '2.7'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: addressable
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '2.3'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '2.3'
83
83
  description: A toolbox for Youtube.
@@ -87,14 +87,15 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
- - .gitignore
91
- - .rspec
90
+ - ".gitignore"
91
+ - ".rspec"
92
92
  - Gemfile
93
93
  - Gemfile.lock
94
94
  - LICENSE.txt
95
95
  - README.md
96
96
  - Rakefile
97
97
  - lib/yt_util.rb
98
+ - lib/yt_util/channel.rb
98
99
  - lib/yt_util/google_plus.rb
99
100
  - lib/yt_util/scrape.rb
100
101
  - lib/yt_util/try.rb
@@ -112,17 +113,17 @@ require_paths:
112
113
  - lib
113
114
  required_ruby_version: !ruby/object:Gem::Requirement
114
115
  requirements:
115
- - - ~>
116
+ - - "~>"
116
117
  - !ruby/object:Gem::Version
117
118
  version: '2.0'
118
119
  required_rubygems_version: !ruby/object:Gem::Requirement
119
120
  requirements:
120
- - - '>='
121
+ - - ">="
121
122
  - !ruby/object:Gem::Version
122
123
  version: '0'
123
124
  requirements: []
124
125
  rubyforge_project:
125
- rubygems_version: 2.4.3
126
+ rubygems_version: 2.3.0
126
127
  signing_key:
127
128
  specification_version: 4
128
129
  summary: Youtube Utility.