This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sendMail(): | |
smtp_server = "smtp.gmail.com" | |
port = 587 # For starttls | |
sender_email = "sender-mail-id" #sender's mail id | |
receiver_email = ['reciever-mail-id'] #list of reciever's mail ids | |
#password = getpass.getpass(prompt="Type your password and press enter: ") | |
password = "enter-your-password-here" | |
print('Runnning\n') | |
file1 = open("data.txt","r") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getLink(number): | |
link='https://www.google.com/search?q='+'geeksforgeeks puzzle '+number | |
response=requests.get(link) | |
ls=[] | |
links=[] | |
try: | |
soup=bs4.BeautifulSoup(response.text,features="html.parser") | |
for tag in soup.find_all('a'): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
evdrvvs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smtplib, ssl | |
import bs4,webbrowser | |
import requests | |
import time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beautifulsoup4==4.9.3 | |
bs4==0.0.1 | |
certifi==2020.12.5 | |
chardet==4.0.0 | |
idna==2.10 | |
requests==2.25.1 | |
soupsieve==2.1 | |
urllib3==1.26.2 | |
APScheduler==3.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from apscheduler.schedulers.blocking import BlockingScheduler | |
from run import sendMail | |
sched = BlockingScheduler() | |
@sched.scheduled_job('interval', minutes=1) | |
def timed_job(): | |
print('This job is run every one minute.') | |
sendMail() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beautifulsoup4==4.9.3 | |
bs4==0.0.1 | |
certifi==2020.12.5 | |
chardet==4.0.0 | |
idna==2.10 | |
requests==2.25.1 | |
soupsieve==2.1 | |
urllib3==1.26.2 | |
APScheduler==3.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clock: python clock.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from apscheduler.schedulers.blocking import BlockingScheduler | |
from run import sendMail | |
sched = BlockingScheduler() | |
@sched.scheduled_job('cron', day_of_week='mon-fri', hour=8) | |
def scheduled_job(): | |
print('This job is run every weekday at 8 AM.') | |
sendMail() | |
sched.start() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sendMail(): | |
smtp_server = "smtp.gmail.com" | |
port = 587 # For starttls | |
sender_email = "sender-mail-id" #sender's mail id | |
receiver_email = ['reciever-mail-id'] #list of reciever's mail ids | |
#password = getpass.getpass(prompt="Type your password and press enter: ") | |
password = "enter-your-password-here" | |
print('Runnning\n') | |
file1 = open("data.txt","r") |