mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-10 15:32:23 +05:30
Clean up comments
This commit is contained in:
parent
edfe1eefe8
commit
799e172609
@ -457,7 +457,8 @@ def fill_links(html, scheme, host)
|
|||||||
|
|
||||||
html.xpath_nodes("//a").each do |match|
|
html.xpath_nodes("//a").each do |match|
|
||||||
url = URI.parse(match["href"])
|
url = URI.parse(match["href"])
|
||||||
if !url.host # If reddit link
|
# Reddit links don't have host
|
||||||
|
if !url.host
|
||||||
url.scheme = scheme
|
url.scheme = scheme
|
||||||
url.host = host
|
url.host = host
|
||||||
match["href"] = url
|
match["href"] = url
|
||||||
@ -480,7 +481,6 @@ def login_req(login_form, f_req)
|
|||||||
}
|
}
|
||||||
|
|
||||||
data = data.merge(login_form)
|
data = data.merge(login_form)
|
||||||
# pp data
|
|
||||||
|
|
||||||
return HTTP::Params.encode(data)
|
return HTTP::Params.encode(data)
|
||||||
end
|
end
|
||||||
|
@ -436,6 +436,7 @@ post "/login" do |env|
|
|||||||
|
|
||||||
login = client.get(login.headers["Location"], headers)
|
login = client.get(login.headers["Location"], headers)
|
||||||
headers = login.cookies.add_request_headers(headers)
|
headers = login.cookies.add_request_headers(headers)
|
||||||
|
|
||||||
# We are now logged in
|
# We are now logged in
|
||||||
|
|
||||||
host = URI.parse(env.request.headers["Host"]).host
|
host = URI.parse(env.request.headers["Host"]).host
|
||||||
@ -602,8 +603,6 @@ get "/feed/subscriptions" do |env|
|
|||||||
video["author"] = entry.xpath_node("author/name").not_nil!.content
|
video["author"] = entry.xpath_node("author/name").not_nil!.content
|
||||||
video["ucid"] = entry.xpath_node("channelid").not_nil!.content
|
video["ucid"] = entry.xpath_node("channelid").not_nil!.content
|
||||||
video["thumbnail"] = entry.xpath_node("group/thumbnail").not_nil!["url"].gsub(/hqdefault\.jpg$/, "mqdefault.jpg")
|
video["thumbnail"] = entry.xpath_node("group/thumbnail").not_nil!["url"].gsub(/hqdefault\.jpg$/, "mqdefault.jpg")
|
||||||
# video["thumbnail"] = video["thumbnail"].rstrip("hqdefault.jpg")
|
|
||||||
# video["thumbnail"] += "mqdefault.jpg"
|
|
||||||
|
|
||||||
videos << video
|
videos << video
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user