mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Don't downcase UCID when searching channels
This commit is contained in:
parent
6033e8aed1
commit
4480e9c1ba
2 changed files with 3 additions and 3 deletions
|
@ -578,7 +578,7 @@ get "/search" do |env|
|
||||||
|
|
||||||
case key
|
case key
|
||||||
when "channel", "user"
|
when "channel", "user"
|
||||||
channel = value
|
channel = operator.split(":")[-1]
|
||||||
when "content_type", "type"
|
when "content_type", "type"
|
||||||
content_type = value
|
content_type = value
|
||||||
when "date"
|
when "date"
|
||||||
|
|
|
@ -51,12 +51,12 @@ alias SearchItem = SearchVideo | SearchChannel | SearchPlaylist
|
||||||
def channel_search(query, page, channel)
|
def channel_search(query, page, channel)
|
||||||
client = make_client(YT_URL)
|
client = make_client(YT_URL)
|
||||||
|
|
||||||
response = client.get("/user/#{channel}")
|
response = client.get("/user/#{channel}?disable_polymer=1&hl=en&gl=US")
|
||||||
document = XML.parse_html(response.body)
|
document = XML.parse_html(response.body)
|
||||||
canonical = document.xpath_node(%q(//link[@rel="canonical"]))
|
canonical = document.xpath_node(%q(//link[@rel="canonical"]))
|
||||||
|
|
||||||
if !canonical
|
if !canonical
|
||||||
response = client.get("/channel/#{channel}")
|
response = client.get("/channel/#{channel}?disable_polymer=1&hl=en&gl=US")
|
||||||
document = XML.parse_html(response.body)
|
document = XML.parse_html(response.body)
|
||||||
canonical = document.xpath_node(%q(//link[@rel="canonical"]))
|
canonical = document.xpath_node(%q(//link[@rel="canonical"]))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue