mirror of
https://github.com/PhoenixTwoFive/karaoqueue.git
synced 2025-12-14 12:41:57 +01:00
Initial Commit
This commit is contained in:
16
helpers.py
Normal file
16
helpers.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
def get_catalog_url():
|
||||
r = requests.get('https://www.karafun.de/karaoke-song-list.html')
|
||||
soup = BeautifulSoup(r.content, 'html.parser')
|
||||
url = soup.findAll('a', href=True, text='CSV')[0]['href']
|
||||
return url
|
||||
|
||||
def get_songs(url):
|
||||
r = requests.get(url)
|
||||
return r.text
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(get_songs)
|
||||
Reference in New Issue
Block a user