diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-03-25 22:21:24 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-03-25 22:21:24 -0500 |
| commit | 799e1726091c85dfced1d19eb940d2d581f87fbe (patch) | |
| tree | e50ea823aa463d17dc0e010783af2a9178cab5a0 | |
| parent | edfe1eefe83d4c520d1b4aaffbc59627914fefc9 (diff) | |
| download | invidious-799e1726091c85dfced1d19eb940d2d581f87fbe.tar.gz invidious-799e1726091c85dfced1d19eb940d2d581f87fbe.tar.bz2 invidious-799e1726091c85dfced1d19eb940d2d581f87fbe.zip | |
Clean up comments
| -rw-r--r-- | src/helpers.cr | 4 | ||||
| -rw-r--r-- | src/invidious.cr | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/helpers.cr b/src/helpers.cr index 16e50ccd..bedaa132 100644 --- a/src/helpers.cr +++ b/src/helpers.cr @@ -457,7 +457,8 @@ def fill_links(html, scheme, host) html.xpath_nodes("//a").each do |match| url = URI.parse(match["href"]) - if !url.host # If reddit link + # Reddit links don't have host + if !url.host url.scheme = scheme url.host = host match["href"] = url @@ -480,7 +481,6 @@ def login_req(login_form, f_req) } data = data.merge(login_form) - # pp data return HTTP::Params.encode(data) end diff --git a/src/invidious.cr b/src/invidious.cr index c9018507..40304149 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -436,6 +436,7 @@ post "/login" do |env| login = client.get(login.headers["Location"], headers) headers = login.cookies.add_request_headers(headers) + # We are now logged in 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["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"] = video["thumbnail"].rstrip("hqdefault.jpg") - # video["thumbnail"] += "mqdefault.jpg" videos << video end |
