mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Remove non-functioning 'begin'
This commit is contained in:
parent
aa0864f87d
commit
051aff07ed
1 changed files with 3 additions and 7 deletions
|
@ -105,10 +105,8 @@ def get_client(pool)
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_video(id, client)
|
def fetch_video(id, client)
|
||||||
begin
|
|
||||||
info = client.get("/get_video_info?video_id=#{id}&el=detailpage&ps=default&eurl=&gl=US&hl=en").body
|
info = client.get("/get_video_info?video_id=#{id}&el=detailpage&ps=default&eurl=&gl=US&hl=en").body
|
||||||
html = client.get("/watch?v=#{id}").body
|
html = client.get("/watch?v=#{id}").body
|
||||||
end
|
|
||||||
|
|
||||||
html = XML.parse_html(html)
|
html = XML.parse_html(html)
|
||||||
info = HTTP::Params.parse(info)
|
info = HTTP::Params.parse(info)
|
||||||
|
@ -188,9 +186,7 @@ def get_video(id, client, db, refresh = true)
|
||||||
end
|
end
|
||||||
|
|
||||||
def search(query, client)
|
def search(query, client)
|
||||||
begin
|
|
||||||
html = client.get("https://www.youtube.com/results?q=#{query}&sp=EgIQAVAU").body
|
html = client.get("https://www.youtube.com/results?q=#{query}&sp=EgIQAVAU").body
|
||||||
end
|
|
||||||
|
|
||||||
html = XML.parse_html(html)
|
html = XML.parse_html(html)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue