mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Use more advanced query for reddit search
This commit is contained in:
parent
68de3de377
commit
53acf1f6d6
1 changed files with 2 additions and 2 deletions
|
@ -249,8 +249,8 @@ def make_client(url, context)
|
|||
end
|
||||
|
||||
def get_reddit_comments(id, client)
|
||||
youtube_url = "https://www.youtube.com/watch?v=#{id}"
|
||||
search_results = client.get("/submit.json?url=#{youtube_url}")
|
||||
query = "(url:3D#{id}%20OR%20url:#{id})%20(site:youtube.com%20OR%20site:youtu.be)"
|
||||
search_results = client.get("/search.json?q=#{query}")
|
||||
|
||||
if search_results.status_code == 302
|
||||
search_results = client.get(search_results.headers["Location"]).body
|
||||
|
|
Loading…
Reference in a new issue