player.py 383 B

12345678910111213141516171819
  1. from getpass import getpass
  2. import requests
  3. from html.parser import HTMLParser
  4. from html.entities import name2codepoint
  5. class playerParser(HTMLParser):
  6. url = ""
  7. def handle_starttag(self, tag, attrs):
  8. if tag == 'source':
  9. self.url = attrs[1][1]
  10. print(self.url)
  11. #def handle_data(self, data):
  12. #def handle_endtag(self, tag):