mirror of
https://github.com/iv-org/invidious.git
synced 2025-11-23 18:05:32 +00:00
Always use ucid for channel search
This commit is contained in:
@@ -53,12 +53,12 @@ alias SearchItem = SearchVideo | SearchChannel | SearchPlaylist
|
||||
def channel_search(query, page, channel)
|
||||
client = make_client(YT_URL)
|
||||
|
||||
response = client.get("/user/#{channel}?disable_polymer=1&hl=en&gl=US")
|
||||
response = client.get("/channel/#{channel}?disable_polymer=1&hl=en&gl=US")
|
||||
document = XML.parse_html(response.body)
|
||||
canonical = document.xpath_node(%q(//link[@rel="canonical"]))
|
||||
|
||||
if !canonical
|
||||
response = client.get("/channel/#{channel}?disable_polymer=1&hl=en&gl=US")
|
||||
response = client.get("/c/#{channel}?disable_polymer=1&hl=en&gl=US")
|
||||
document = XML.parse_html(response.body)
|
||||
canonical = document.xpath_node(%q(//link[@rel="canonical"]))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user