video_chat_get 0.2.0 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/site_list/mildom_analyze.rb +2 -1
- data/lib/site_list/twitcasting_analyze.rb +3 -3
- data/lib/video_chat_get/version.rb +1 -1
- data/lib/video_chat_get.rb +19 -16
- data/video_chat_get.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f742a50cefadcf590f21ab2246937d79f9329f0148cde5465e44d4709c2b764c
|
4
|
+
data.tar.gz: 5a60651594271a7bf352113d84669067e1b3430f32b2aac1ee263a5945c2b07f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d734cae4cf271edfb9b92f5f66f05815a4543f7615f751f217e670b07aa748f76bfc6ca6a67b04dc571879f5fba445f65ba6a617fa13d8e923b5989388debb69
|
7
|
+
data.tar.gz: b1d81f6d0bfe9c2d24e158498833ee803f91750e48168adeef93f022c3c6ad7044f33522808954d5866f771cf78872b1aed0a82dd3a9e93daa614030e94ee28e
|
data/Gemfile.lock
CHANGED
@@ -13,12 +13,13 @@ class Mildom_analyze<Video_analyze
|
|
13
13
|
|
14
14
|
def initialize(url)
|
15
15
|
@VIDEOINFO_REQEST_URL="https://cloudac.mildom.com/nonolive/videocontent/playback/getPlaybackDetail?v_id="
|
16
|
+
@VIDEOINFO_REQEST_PARAMETER="&__platform=web"
|
16
17
|
@CHAT_REQEST_URL="https://cloudac.mildom.com/nonolive/videocontent/chat/replay?video_id="
|
17
18
|
@CHAT_REQEST_PARAMETER="&time_offset_ms="
|
18
19
|
|
19
20
|
@video_url=url
|
20
21
|
@video_id=videoid_get()
|
21
|
-
@videoinfo,@videoinfo_request_status=request_json_parse(@VIDEOINFO_REQEST_URL+@video_id)
|
22
|
+
@videoinfo,@videoinfo_request_status=request_json_parse(@VIDEOINFO_REQEST_URL+@video_id+@VIDEOINFO_REQEST_PARAMETER)
|
22
23
|
@chatlog_filepath="./"+@video_id+".txt"
|
23
24
|
end
|
24
25
|
|
@@ -37,15 +37,15 @@ class Twitcasting_analyze<Video_analyze
|
|
37
37
|
|
38
38
|
videoinfo={}
|
39
39
|
videoinfo["user_name"]=@videoinfo_request_body.at_css(".tw-user-nav-name").text.strip
|
40
|
-
videoinfo["video_title"]=@videoinfo_request_body.at_css("
|
40
|
+
videoinfo["video_title"]=@videoinfo_request_body.at_css(".tw-player-page__title-editor-value").text
|
41
41
|
videoinfo["video_time"]=@videoinfo_request_body.at_css(".tw-player-duration-time").text.strip
|
42
|
-
videoinfo["video_start_time"]=@videoinfo_request_body.at_css(".tw-player-meta__status_item > time")
|
42
|
+
videoinfo["video_start_time"]=@videoinfo_request_body.at_css(".tw-player-meta__status_item > time").attribute('datetime').text
|
43
43
|
|
44
44
|
videoinfo_polymer=@videoinfo_request_body.css(".tw-player-meta__status").css(".tw-player-meta__status_item")
|
45
45
|
i=0
|
46
46
|
videoinfo_polymer.each do |fact|
|
47
47
|
if i==1 then
|
48
|
-
videoinfo["total_view"]=fact.text.
|
48
|
+
videoinfo["total_view"]=fact.attribute('aria-label').text.split(":",2)[1].strip
|
49
49
|
return videoinfo
|
50
50
|
end
|
51
51
|
i+=1
|
data/lib/video_chat_get.rb
CHANGED
@@ -21,37 +21,40 @@ module VideoChatGet
|
|
21
21
|
@@YOUTUBELIVE_IDENTFIER="https://www.youtube.com/watch?"
|
22
22
|
@@TWITCASTING_IDENTFIER="https://twitcasting.tv/"
|
23
23
|
|
24
|
-
|
25
|
-
"hello"
|
26
|
-
end
|
27
|
-
|
24
|
+
|
28
25
|
def self.url_route(url)
|
29
26
|
|
30
27
|
if url.include?(@@OPENREC_IDENTFIER) then
|
31
28
|
puts "identifier:openrec videourl:#{url}"
|
32
29
|
obj=Openrec_analyze.new(url)
|
33
|
-
obj.chat_scrape
|
34
|
-
|
30
|
+
return obj.chat_scrape
|
31
|
+
end
|
32
|
+
|
33
|
+
if url.include?(@@MILDOM_IDENTFIER) then
|
35
34
|
puts "identifier:mildom videourl:#{url}"
|
36
35
|
obj=Mildom_analyze.new(url)
|
37
|
-
obj.chat_scrape
|
38
|
-
|
36
|
+
return obj.chat_scrape
|
37
|
+
end
|
38
|
+
|
39
|
+
if url.include?(@@WHOWATCH_IDENTFIER) then
|
39
40
|
puts "identifier:whowatch videourl:#{url}"
|
40
41
|
obj=Whowatch_analyze.new(url)
|
41
|
-
obj.chat_scrape
|
42
|
-
|
42
|
+
return obj.chat_scrape
|
43
|
+
end
|
44
|
+
|
45
|
+
if url.include?(@@YOUTUBELIVE_IDENTFIER) then
|
43
46
|
puts "identifier:youtube videourl:#{url}"
|
44
47
|
obj=Youtubelive_analyze.new(url)
|
45
|
-
obj.chat_scrape
|
46
|
-
|
48
|
+
return obj.chat_scrape
|
49
|
+
end
|
50
|
+
|
51
|
+
if url.include?(@@TWITCASTING_IDENTFIER) then
|
47
52
|
puts "identifier:twitcasting videourl:#{url}"
|
48
53
|
obj=Twitcasting_analyze.new(url)
|
49
|
-
obj.chat_scrape
|
50
|
-
else
|
51
|
-
puts "urlerr"
|
54
|
+
return obj.chat_scrape
|
52
55
|
end
|
53
56
|
|
54
|
-
"
|
57
|
+
return "url error"
|
55
58
|
end
|
56
59
|
|
57
60
|
end
|
data/video_chat_get.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = "video_chat_get"
|
8
8
|
spec.version = VideoChatGet::VERSION
|
9
9
|
spec.authors = ["tf0101"]
|
10
|
-
spec.email = ["
|
10
|
+
spec.email = ["tf0101_emaile"]
|
11
11
|
|
12
12
|
spec.summary = %q{videochat scraping package}
|
13
13
|
spec.description = %q{videochat scraping}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: video_chat_get
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tf0101
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -96,7 +96,7 @@ dependencies:
|
|
96
96
|
version: 1.10.9
|
97
97
|
description: videochat scraping
|
98
98
|
email:
|
99
|
-
-
|
99
|
+
- tf0101_emaile
|
100
100
|
executables:
|
101
101
|
- videochatget
|
102
102
|
extensions: []
|