-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgoogle.py
45 lines (31 loc) · 1.22 KB
/
google.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
from fileinput import filename
import pickle
print("""
*
Telegram : https://t.me/itslucifero
""")
try:
from googlesearch import search
except ImportError:
print("No module named 'google' found")
# Variables
query = input('Enter your dork or search : ')
number = int(input('How much sites you want ? MAX 100 : '))
print('***********************************GRABBING URLS***********************************')
#list
arr = []
for j in search(query, tld="co.in", num=number, stop=number, pause=10):
arr.append(j)
jeez ='\n'.join([str(item) for item in arr])
data = input('Done,Do You Want to save results ? : YES / NO ')
if data.lower() == 'yes' or 'y':
textfile = input('What do u wanna name the file ? : ')
text_file = open(f"{textfile}.txt", "w")
#Opens or creates the .txt file, sharing the directory of the script#
text_file.write(jeez)
#Writes the variable into the .txt file#
text_file.close()
print(f'Text File {textfile}.txt Saved In PATH BYEE')
quit()
else:
quit()