@kaiserb1/

similar music api

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import requests
import replit
from bs4 import BeautifulSoup
import time


def music_map(band):
  data = requests.get('https://www.music-map.com/map-search.php?f='+band)
  data = data.text
  soup = BeautifulSoup(data,'html.parser')
  bands = soup.find_all('a', class_='S')
  bands = map(lambda x: x.get_text(), bands)
  print('\n'.join(list(bands)))

while True:
  time.sleep(0.5)
  replit.clear()
  print()
  print("bored with your music type an artist and find all kinds of new music")
  print()
  band = input("band : ")
  replit.clear()
  music_map(band)
  input()