-
Notifications
You must be signed in to change notification settings - Fork 1
/
Musicfinder.py
51 lines (37 loc) · 1.43 KB
/
Musicfinder.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# import library
from bs4 import BeautifulSoup
import requests
def banner():
print("""
__ __ _ _____ _ _
| \/ |_ _ ___(_) ___ | ___(_)_ __ __| | ___ _ __
| |\/| | | | / __| |/ __| | |_ | | '_ \ / _` |/ _ \ '__|
| | | | |_| \__ \ | (__ | _| | | | | | (_| | __/ |
|_| |_|\__,_|___/_|\___| |_| |_|_| |_|\__,_|\___|_|
Created By : AmirhoseinSohrabi
Gmail : amirhoseinsohrabi.official@gmail.com
""")
def input_name():# input the name
global name
name = input("Enter The Singer Name : ")
def requests_():# send request to google
global req
session = requests.session()
session.headers.update({'User-Agent':'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/64.0.3282.167 Chrome/64.0.3282.167 Safari/537.36'})
req = session.get(f"https://www.google.com/search?q=intitle%3Aindex+of+mp3+intext%3A%22{name}%22")
def filter_():# Filter the Content
global link
soup = BeautifulSoup(req.content,'html.parser')
link = soup.select('a')
def find():#Find the Link
global z
z = []
for i in link :
x = (i.get('href'))
z.append(x)
def view():# VIew the Link
number = 0
link = z[9:19]
for finder in link :
number += 1
print(f'Link : {number} {finder}\n')