diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-03-04 08:11:44 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-03-04 08:11:44 -0600 |
| commit | 051aff07edaa402fd7b48c3a28bee29e1b1c9569 (patch) | |
| tree | ac75842eaf3f086195c7e433377393c296e40d09 | |
| parent | aa0864f87d74b562384205df2264b5449fdb38cc (diff) | |
| download | invidious-051aff07edaa402fd7b48c3a28bee29e1b1c9569.tar.gz invidious-051aff07edaa402fd7b48c3a28bee29e1b1c9569.tar.bz2 invidious-051aff07edaa402fd7b48c3a28bee29e1b1c9569.zip | |
Remove non-functioning 'begin'
| -rw-r--r-- | src/helpers.cr | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/helpers.cr b/src/helpers.cr index 1492e7cc..86a520e9 100644 --- a/src/helpers.cr +++ b/src/helpers.cr @@ -105,10 +105,8 @@ def get_client(pool) end 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 - html = client.get("/watch?v=#{id}").body - end + 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 = XML.parse_html(html) info = HTTP::Params.parse(info) @@ -188,9 +186,7 @@ def get_video(id, client, db, refresh = true) end def search(query, client) - begin - html = client.get("https://www.youtube.com/results?q=#{query}&sp=EgIQAVAU").body - end + html = client.get("https://www.youtube.com/results?q=#{query}&sp=EgIQAVAU").body html = XML.parse_html(html) |
