mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Hotfix for !song
This commit is contained in:
parent
9830e1d8c3
commit
f494bac4d9
@ -26,11 +26,8 @@ async def parsePlaylist(url):
|
||||
|
||||
async def getTitle(url):
|
||||
try:
|
||||
#page = requests.get(url, headers=headers)
|
||||
page = await aiohttp.post(url, headers=headers)
|
||||
page = await page.text()
|
||||
soup = BeautifulSoup(page, 'html.parser')
|
||||
page = requests.get(url, headers=headers)
|
||||
soup = BeautifulSoup(page.content, 'html.parser')
|
||||
return soup.title.string.replace(" - YouTube", "")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
except:
|
||||
return False
|
||||
Loading…
x
Reference in New Issue
Block a user