video_chat_get 0.3.6.8 → 0.3.6.10

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
  SHA256:
3
- metadata.gz: fc9d6fc28677944005107fb395f165cd69c11543833ed7f9525139eeb66928e5
4
- data.tar.gz: 28e035262b27e6a6db142e8d9787e43316bf3e9eacb10f7496135a5c1abed73c
3
+ metadata.gz: 49243c89d4af8f625dc3d531299915c41adc07fef82aa4c6ddfc2286e36090fe
4
+ data.tar.gz: 6cd4332db4ee6d3e0c3677ed5015b7b5309deb3e7594a008e75ac37a0d17263e
5
5
  SHA512:
6
- metadata.gz: 7da6bb45633139e77fbfc0d21d8b1306448491c0d33a41a7f806a17ba98654d8ed849e5a6009d1195bfeff2f91103007b315cc022338d47ed7db178ed1a08e79
7
- data.tar.gz: bde6fe0aa041f4e457f4cefd6f71c22aa49a623a86c7f18925ec56fa6d4dacd3ec7d95ce1a5d02cefc1358e9dfffb2010aba4a849a245c68aa8b5730ca6b5d2e
6
+ metadata.gz: c5667d5aea2ec03bad506b0f7575784583d221de28390d76635f196db61f2afae54dabd606e7be372f842e66c61c90d3e96f1d62e79c4e71c640a917e94fba31
7
+ data.tar.gz: 2b8ccdbfd284c58ce0070232980d5ab09e57eca35c8a341a370adb1542c4d6d9a7e4f867f778aeb5c7d276476a028c7ca248f6f9276e298de1628f7ea690fd04
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- video_chat_get (0.3.6.8)
4
+ video_chat_get (0.3.6.10)
5
5
  httpclient (~> 2.8.3)
6
6
  json (~> 2.3.0)
7
7
  nokogiri (~> 1.10.9)
@@ -57,7 +57,7 @@ class Youtubelive_analyze<Video_analyze
57
57
 
58
58
  videoinfo["ch"]=common_hash.dig(1, "videoSecondaryInfoRenderer", "owner", "videoOwnerRenderer", "title", "runs", 0, "text")
59
59
  videoinfo["chid"]=common_hash.dig(1, "videoSecondaryInfoRenderer", "owner", "videoOwnerRenderer", "title", "runs", 0, "navigationEndpoint", "browseEndpoint", "browseId")
60
- videoinfo["title"]=common_hash.dig(0, "videoPrimaryInfoRenderer", "title", "runs", 0, "text")
60
+ videoinfo["title"]=common_hash.dig(0, "videoPrimaryInfoRenderer", "title", "runs")&.map { |run| run.dig("text") }&.join
61
61
  videoinfo["starttime"]=common_hash.dig(0, "videoPrimaryInfoRenderer", "dateText", "simpleText")
62
62
  videoinfo["endtime"]=common_hash.dig(0, "videoPrimaryInfoRenderer","relativeDateText","simpleText")
63
63
  videoinfo["videocount"]=common_hash.dig(0, "videoPrimaryInfoRenderer", "viewCount", "videoViewCountRenderer", "viewCount", "simpleText")
@@ -104,11 +104,13 @@ class Youtubelive_analyze<Video_analyze
104
104
 
105
105
 
106
106
 
107
- def chat_scrape(log_flag=true,log_path=@chatlog_filepath)
107
+ def chat_scrape(log_flag=true,log_path=@chatlog_filepath,progressbar=true)
108
108
 
109
109
  chat_list=[]
110
110
  chat_count=0
111
- next_url=@CHAT_REQUEST_URL + @videoinfo_body["contents"]["twoColumnWatchNextResults"]["conversationBar"]["liveChatRenderer"]["continuations"][0]["reloadContinuationData"]["continuation"]
111
+ next_path = @videoinfo_body.dig("contents", "twoColumnWatchNextResults", "conversationBar", "liveChatRenderer", "continuations", 0, "reloadContinuationData", "continuation")
112
+ return chat_list if next_path.nil?
113
+ next_url=@CHAT_REQUEST_URL + next_path
112
114
 
113
115
  while true do
114
116
  begin
@@ -117,7 +119,7 @@ class Youtubelive_analyze<Video_analyze
117
119
  chat_count+=1
118
120
  chat_list.push chat
119
121
  end
120
- progressbar(chat_count,"chat_count_inf")
122
+ progressbar(chat_count,"chat_count_inf") if progressbar
121
123
 
122
124
  next_url=@CHAT_REQUEST_URL + chat_body["continuationContents"]["liveChatContinuation"]["continuations"][0]["liveChatReplayContinuationData"]["continuation"]
123
125
  sleep(1)
@@ -1,3 +1,3 @@
1
1
  module VideoChatGet
2
- VERSION = "0.3.6.8"
2
+ VERSION = "0.3.6.10"
3
3
  end
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.3.6.8
4
+ version: 0.3.6.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - tf0101
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-11 00:00:00.000000000 Z
11
+ date: 2024-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler