From 2c286c9d39834861d7e7b93662c4e7932bd07b8f Mon Sep 17 00:00:00 2001 From: siengrain Date: Sat, 12 Feb 2022 04:54:30 +0000 Subject: [PATCH] removed web selector now u dont have to pick a website to scrap (less annoying to use) --- main.py | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/main.py b/main.py index e74781b..9891ce2 100644 --- a/main.py +++ b/main.py @@ -1,31 +1,25 @@ -#!/bin/env python +#!/usr/bin/env python3 + import azl import letras - while True: - web = '' val = '' artist = input('Name of the artist/band: ') title = input('Name of the song: ') - web = input('Where would u like to search? (a for azl/l for letras): ') - if web == 'a': - song_url = azl.getLink(artist, title) - un_lyr = azl.getLyrics(song_url) - fin = azl.parsero(un_lyr) - if fin == '
': - fin = "Sorry I couldn't find that song :(" - print('\n<------------------------------------------------------------->') + song_url = azl.getLink(artist, title) + un_lyr = azl.getLyrics(song_url) + fin = azl.parsero(un_lyr) + if fin == '
': + fin = "Sorry I couldn't find that song :(" + print('\n<------------------------------------------------------------->') + if fin != "Sorry I couldn't find that song :(": print(fin) - elif web == 'l': + else: song_url = letras.getLink(artist, title) un_lyr = letras.getLyrics(song_url) fin = letras.parsero(un_lyr) - print('\n<------------------------------------------------------------->') print(fin) - else: - print("I didn't give u that option dude") - continue while True: print('<------------------------------------------------------------->') res = input("What's the move? (s to search for another song/q to quit): ") @@ -42,4 +36,4 @@ while True: break else: print('SOMETHING WENT HORRIBLY WRONG GOTTA GO') - break \ No newline at end of file + break \ No newline at end of file