DEPENDENCIES:

CODE:

from pytube import YouTube
save_location=”E:/”
vdo_link=input(“ENTER THE VIDEO LINK YOU WANT TO DOWNLOAD:”)
try:
try:
yt = YouTube(vdo_link)
except:
print(“YOU ARE NOT CONNECTED TO THE INTERNET”)
print(“CONNECT TO THE INTERNET 1ST & THEN TRY AGAIN…..”)
mp4files=yt.filter(‘mp4’)
yt.set_filename(‘SET VIDEO NAME’)
download_video = yt.get(
mp4files[-1].extension,mp4files[-1].resolution)
print(“TASK ADDED”)
try:
download_video.download(save_location)
except:
print(“NETWORK PROBLEM...PLEASE CHECK YOUR INTERNET”)
print(‘Task Completed!’)
except:
print(“DO NOT U WANT TO DOWNLOAD THIS…………….”)
print(“Try ANOTHER ONE”)


Top headlines (/v2/top-headlines):-

GEThttps://newsapi.org/v2/top-headlines?country=us&apiKey=API_KEY

Request parameters:-

country:


  • Popularity of source

AUTHENTICATION


DEPENDENCIES:



$ pip install translate
from translate import Translator
print(“\nINDIAN LANGUAGE TRANSLATOR\n”)
print(“lang_code language \n en English(India) \n gu-IN Gujarati(India) \n hi-IN Hindi(India) \n kn-IN Kannada(India) \n kok-IN Konkani(India) \n mr-IN Marathi(India) \n pa-IN Punjabi(India) \n sa-IN Sanskrit(India) \n ta-IN Tamil(India) \n te-IN…


import bs4
import lxml
from bs4 import BeautifulSoup as soup
from urllib.request import urlopen
news_url=”https://news.google.com/rss"root=urlopen(news_url)xml_page=root.read()root.close()soup_page=soup(xml_page,”xml”)
news_list=soup_page.findAll(“item”)
for news in news_list:
print(news.title.text)
print(news.link.text)
print(news.pubDate.text)
print(“-”*60)

PYTHON PROGRAMMERS

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store