diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-09-26 10:33:08 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-09-26 10:33:08 -0500 |
| commit | 5d7bd9af0f628b59fd3bb11d4f81236e7a8be5c3 (patch) | |
| tree | 23cd8162c1ed0d3e47ddd0b317eb3ef2f9bcdf7e | |
| parent | aa819a189ee154a18a32a0c2b6ba9e125539dc78 (diff) | |
| download | invidious-5d7bd9af0f628b59fd3bb11d4f81236e7a8be5c3.tar.gz invidious-5d7bd9af0f628b59fd3bb11d4f81236e7a8be5c3.tar.bz2 invidious-5d7bd9af0f628b59fd3bb11d4f81236e7a8be5c3.zip | |
Add host language for comments
| -rw-r--r-- | src/invidious.cr | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index abc61137..77959231 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -1832,8 +1832,8 @@ get "/api/v1/comments/:id" do |env| headers["content-type"] = "application/x-www-form-urlencoded" headers["x-client-data"] = "CIi2yQEIpbbJAQipncoBCNedygEIqKPKAQ==" - headers["x-spf-previous"] = "https://www.youtube.com/watch?v=#{id}" - headers["x-spf-referer"] = "https://www.youtube.com/watch?v=#{id}" + headers["x-spf-previous"] = "https://www.youtube.com/watch?v=#{id}&bpctr=#{Time.new.epoch + 2000}&gl=US&hl=en&disable_polymer=1" + headers["x-spf-referer"] = "https://www.youtube.com/watch?v=#{id}&bpctr=#{Time.new.epoch + 2000}&gl=US&hl=en&disable_polymer=1" headers["x-youtube-client-name"] = "1" headers["x-youtube-client-version"] = "2.20180719" @@ -1866,7 +1866,7 @@ get "/api/v1/comments/:id" do |env| } post_req = HTTP::Params.encode(post_req) - response = client.post("/comment_service_ajax?action_get_comments=1&pbj=1&ctoken=#{ctoken}&continuation=#{continuation}&itct=#{itct}", headers, post_req).body + response = client.post("/comment_service_ajax?action_get_comments=1&pbj=1&ctoken=#{ctoken}&continuation=#{continuation}&itct=#{itct}&hl=en&gl=US", headers, post_req).body response = JSON.parse(response) env.response.content_type = "application/json" |
