pip install mutagen
import pygame, mutagen.mp3
song_file = "c:\\Music2\\Numb.mp3"
mp3 = mutagen.mp3.MP3(song_file)
pygame.mixer.init(frequency=mp3.info.sample_rate)
pygame.mixer.music.load(song_file)
pygame.mixer.music.play()
class CustomProxyConnector(ProxyConnector):
async def connect(self, req, traces):
if self._proxy_type.is_http():
req.update_proxy(self.proxy_url.with_scheme('http'), None,
req.proxy_headers)
return await super(ProxyConnector, self).connect(
req=req, traces=traces)
conn = CustomProxyConnector.from_url(url=proxy)
async with aiohttp.ClientSession(connector=conn
) as session: