mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Always use ucid for channel search
This commit is contained in:
parent
4e6a931de3
commit
aa8ff7ace3
2 changed files with 3 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue