mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-07 01:42:30 -05:00
Hotfix for !song
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user