text: from bs4 import BeautifulSoup
  import requests
  import sendingemail
  import smtplib,time,datetime,os
  emailsent = False
  
  lr=open('channels.txt','w+')
  
  f=open('channels.txt','a+')
  source = requests.get("http://www.youtube.com/feed/trending").text
  soup = BeautifulSoup(source, 'html.parser')
  
  
  asdf=0
  titleslist=[]
  for content in soup.find_all('div', class_= "yt-lockup-content"):
      title = content.div.text
      bitle = content.h3.a.text
      
      if asdf == 0:
          titleslist.append(bitle)
          lr.write(title)
      else:
          titleslist.append(bitle)
          f.writelines(title+'\n')
      asdf+=1
  f.close()
  count=1
  import favoritechannels
  t=favoritechannels.listofchannels
  
  filecontent=open("channels.txt",'r+')
  toemail=open("toemail.txt",'w+')
  line=filecontent.readline()
  count2=0
  ##print(len(titleslist))
  while line:
      count2=count
      
      for i in t:
          line=line.replace(' ','')
          i=i.replace(' ','')
          ##print(':',i,':',':',line,':')
          if line.strip().lower()==i.strip().lower():
              
              print(count+1,':',i,"-",titleslist[count2],file=toemail)
         
      count+=1
      line=filecontent.readline()
  toemail.close()
  yesterdays=open('yesterday.txt','r+')
  yeast=yesterdays.read()
  tomail=open('toemail.txt','r+')
  tomato=tomail.read()
  
  if tomato=='' or yeast==tomato:
      pass
  else:
      sendingemail.job(tomato,email_,password_)
      emailsent=True
      
  
  yep=open("yesterday.txt",'w+')
  yep.write(tomato)
  yep.close()
  
  reminder = open('executed.txt','a+')
  date_time = datetime.datetime.now()
  print('Email was Sent :' if emailsent==True else'Email Was not sent :','The time of execution is ',date_time.strftime("%d/%m/%Y, %I:%M:%S %p"),file=reminder)
  reminder.close()
  