diff options
| author | TheFrenchGhosty <47571719+TheFrenchGhosty@users.noreply.github.com> | 2021-03-28 16:15:20 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-28 16:15:20 +0000 |
| commit | c5107ddd3db720d42bfc133a4b9b537f939dd32a (patch) | |
| tree | da90668c92adeb21368b7519d2841aa0111d1402 /src | |
| parent | 533c6cefee1076f32424af5f853ffb7d7a746062 (diff) | |
| parent | 61d49a12150adfca91df98709488f0f29952f3d3 (diff) | |
| download | invidious-c5107ddd3db720d42bfc133a4b9b537f939dd32a.tar.gz invidious-c5107ddd3db720d42bfc133a4b9b537f939dd32a.tar.bz2 invidious-c5107ddd3db720d42bfc133a4b9b537f939dd32a.zip | |
Merge pull request #1938 from tenpura-shrimp/fixcommentsextractcursor
remove comments extract cursor
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/comments.cr | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr index e7e87203..5d72503e 100644 --- a/src/invidious/comments.cr +++ b/src/invidious/comments.cr @@ -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" => { |
