Changed Google-Search to Youtube (fix)
This commit is contained in:
1 parent
9b1e473ec1
commit
93fdfb1f77
1 file changed
+1
-1
+1
-1
@@ -99,7 +99,7 @@ else:
|
||||
h = {"User-Agent": "Mozilla/5.0"}
|
||||
with aiohttp.ClientSession() as client:
|
||||
with client.get("https://www.youtube.com/results", params=p, headers=h) as resp:
|
||||
dom = await resp.text()
|
||||
dom = resp.text()
|
||||
# open("debug.html", "w").write(dom)
|
||||
found = re.findall(r'href"\/watch\?v=([a-zA-Z0-9_-]{11})', dom)
|
||||
url = f"https://youtu.be/{found[0]}"
|
||||
|
||||
Reference in new issue
Block a user