mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
remove comments extract cursor
This commit is contained in:
parent
533c6cefee
commit
61d49a1215
2 changed files with 1 additions and 19 deletions
|
@ -226,7 +226,7 @@ def fetch_youtube_comments(id, db, cursor, format, locale, thin_mode, region, so
|
|||
|
||||
if body["continuations"]?
|
||||
continuation = body["continuations"][0]["nextContinuationData"]["continuation"].as_s
|
||||
json.field "continuation", cursor.try &.starts_with?("E") ? continuation : extract_comment_cursor(continuation)
|
||||
json.field "continuation", continuation
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -580,16 +580,6 @@ def content_to_comment_html(content)
|
|||
return comment_html
|
||||
end
|
||||
|
||||
def extract_comment_cursor(continuation)
|
||||
cursor = URI.decode_www_form(continuation)
|
||||
.try { |i| Base64.decode(i) }
|
||||
.try { |i| IO::Memory.new(i) }
|
||||
.try { |i| Protodec::Any.parse(i) }
|
||||
.try { |i| i["6:2:embedded"]["1:0:string"].as_s }
|
||||
|
||||
return cursor
|
||||
end
|
||||
|
||||
def produce_comment_continuation(video_id, cursor = "", sort_by = "top")
|
||||
object = {
|
||||
"2:embedded" => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue