Changed Google-Search to Youtube (fix)
This commit is contained in:
@@ -228,9 +228,9 @@ else:
|
|||||||
async with client.get("https://www.youtube.com/results", params=p, headers=h) as resp:
|
async with client.get("https://www.youtube.com/results", params=p, headers=h) as resp:
|
||||||
dom = await resp.text()
|
dom = await resp.text()
|
||||||
open("debug.html", "w").write(dom)
|
open("debug.html", "w").write(dom)
|
||||||
print(re.findall(r"watch\?v=(\S{11})", dom))
|
|
||||||
found = re.findall(r"watch\?v=(\S{11})", dom)[0]
|
found = re.findall(r"watch\?v=(\S{11})", dom)[0]
|
||||||
url = f"https://www.youtube.com/watch?v={found}"
|
url = f"https://www.youtube.com/watch?v={found}"
|
||||||
|
print(url)
|
||||||
|
|
||||||
async with ctx.typing():
|
async with ctx.typing():
|
||||||
await ctx.respond("🤖 Your song is queued for download... please wait ", ephemeral=True)
|
await ctx.respond("🤖 Your song is queued for download... please wait ", ephemeral=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user