-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwall-e.py
More file actions
108 lines (91 loc) · 2.86 KB
/
wall-e.py
File metadata and controls
108 lines (91 loc) · 2.86 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import time
import datetime
import smtplib
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
import pyautogui as pg
s=Service('chromedriver.exe')
currentTime = datetime.datetime.now()
currentTime.hour
if currentTime.hour < 12:
now="Good morning"
elif 12 <= currentTime.hour < 17:
now="Good afternoon "
else:
now="Good evening "
print("")
print(f"Hello Sir ... {now}! ")
print("I'm Wall-E ;) \nA small scale assistant created by Adarsh Gupta \n")
def github():
driver=webdriver.Chrome(service=s)
driver.maximize_window()
driver.get('https://github.com/login')
time.sleep(1)
user=driver.find_element('id','login_field')
user.click()
user.send_keys('adgupta183@gmail.com')
paswd=driver.find_element("id",'password')
paswd.click()
paswd.send_keys('yourgithubPasswd')
submit=driver.find_element('name','commit')
submit.click()
def whatsapp():
driver=webdriver.Chrome(service=s)
driver.maximize_window()
driver.get('https://web.whatsapp.com/')
def youtube():
driver=webdriver.Chrome(service=s)
driver.maximize_window()
driver.get('https://youtube.com/')
def javaonlinec():
driver=webdriver.Chrome(service=s)
driver.maximize_window()
driver.get('https://www.onlinegdb.com/online_java_compiler')
def sendEmail():
server = smtplib.SMTP('smtp.gmail.com', 587)
server.ehlo()
server.starttls()
server.ehlo()
server.login('adgupta183@gmail.com', 'yourGoogleappPassswdforbypassing2-stepverification')
msg=f"subject : {sub} \n\n{body}"
server.sendmail('adgupta183@gmail.com', to_user , msg)
print("Your message has been delivered successfully !")
def lastoptn():
pg.moveTo(101,1057,0.1)
pg.click()
pg.write(input_user)
pg.press('enter')
def search():
driver=webdriver.Chrome(service=s)
driver.maximize_window()
pg.moveTo(312,65,0.1)
pg.click()
word=input_user[7:]
pg.write(word)
pg.press('enter')
while(True):
print("\nHow can I help you today \n")
input_user=input().lower()
if 'github' in input_user:
github()
elif 'email' in input_user:
print("Enter the recipient address : ")
to_user=input()
print("Enter the subject be : ")
sub=input()
print("Enter the body : ")
body=input()
sendEmail()
elif 'wp' in input_user or 'whatsapp' in input_user:
whatsapp()
elif 'yt' in input_user or 'youtube' in input_user:
youtube()
elif 'java' in input_user or 'java compiler' in input_user:
javaonlinec()
elif 'search' in input_user:
search()
elif 'quit' in input_user or 'exit' in input_user:
print("Thank you Sir, Have a good day !")
break
else:
lastoptn()