video_info 4.0.0 → 4.1.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b389a80be182106eeba217bf53d64801d78c9e95110e39c136d53af11dd813fe
|
4
|
+
data.tar.gz: 6dc99daeaafd264ef991232c85fa5bc6b4c3713d8ef83895e48bc6f27a461d61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91095899474824019cc2fa55f128fd20c3fe288aa558de950abc2ea39f2546cdfb68597992e1abad1f6294ea9deb49c190ce8676bcb036cbb2d82ee6177082d6
|
7
|
+
data.tar.gz: d0a09d7f75591250157f8d4c2e9996a7072db3f41bf1fed92adf8235066c535147f7c1d4f0b5451aec16673c33635577e2bfb0d5c29cf5a901bcabb51b0abcd7
|
data/README.md
CHANGED
@@ -131,9 +131,9 @@ class VideoInfo
|
|
131
131
|
private
|
132
132
|
|
133
133
|
def user_interaction_count(interaction_type:)
|
134
|
-
interaction_statistic
|
134
|
+
interaction_statistic&.find do |stat|
|
135
135
|
stat["interactionType"] == "http://schema.org/#{interaction_type}"
|
136
|
-
end["userInteractionCount"
|
136
|
+
end&.public_send(:[], "userInteractionCount")
|
137
137
|
end
|
138
138
|
|
139
139
|
def interaction_statistic
|
@@ -29,7 +29,11 @@ class VideoInfo
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def channel_id
|
32
|
-
itemprop_node_value("channelId")
|
32
|
+
# NOTE the previous implementation, based on itemprop_node_value("channelId"),
|
33
|
+
# does not work well, probably due to some YouTube change
|
34
|
+
page_content = data.to_s
|
35
|
+
matches = page_content.match(/"channelId":"([a-zA-Z0-9_-]+)"/)
|
36
|
+
matches[1] if matches
|
33
37
|
end
|
34
38
|
|
35
39
|
def author_url
|
data/lib/video_info/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: video_info
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thibaud Guillaume-Gentil
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iso8601
|
@@ -212,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
212
212
|
- !ruby/object:Gem::Version
|
213
213
|
version: '0'
|
214
214
|
requirements: []
|
215
|
-
rubygems_version: 3.4.
|
215
|
+
rubygems_version: 3.4.10
|
216
216
|
signing_key:
|
217
217
|
specification_version: 4
|
218
218
|
summary: Dailymotion, Vimeo and YouTube info parser.
|