We have to first install the PYTUBE library.
from pytube import YouTube
vdo_link=input(“ENTER THE VIDEO LINK YOU WANT TO DOWNLOAD:”)
yt = YouTube(vdo_link)
print(“YOU ARE NOT CONNECTED TO THE INTERNET”)
print(“CONNECT TO THE INTERNET 1ST & THEN TRY AGAIN…..”)
yt.set_filename(‘SET VIDEO NAME’)
download_video = yt.get(
print(“NETWORK PROBLEM...PLEASE CHECK YOUR INTERNET”)
print(“DO NOT U WANT TO DOWNLOAD THIS…………….”)
print(“Try ANOTHER ONE”)
-returns breaking news headlines for a country and category,
-display news from a single or multiple sources
-display the live up-to-date news headlines and images.
-we can also search with keywords.
-here, sorting is like the earliest date article is published first.
-This endpoint is great for retrieving headlines for display on
The 2-letter ISO 3166–1 code of the country we want to get headlines for.
the Possible options are: ae ar at au be bg br ca ch cn co cu cz de eg fr gb gr hk hu id ie il in it jp kr lt…
· News API is a simple HTTP REST API for searching and retrieving live articles from all over the web.
· We can search for articles with any combination of the following criteria:
1. Keyword or phrase.
2. Date published.
3. Source name.
4. Source domain name.
· We can sort the results in the following orders:
-Relevancy to search keyword
· The authentication is handled with a simple API key.
· The API key is attached to a request 1st.
· We can do this in one of the three ways:
· We’ll need an API key 1st.They’re free for development, open-source, and non-commercial use.
· And we can get one #over here.
CLICK HERE to get some knowledge about NEWS API.
· We can fetch the data from the api key by 2 methods..
1. by making web requests in our chosen programming language.
2. by using the client libraries.
· Two of the most popular use cases for News API are below.i.e.:
A. to show the users live top and breaking news headlines
B. to search across every news article that mentions a specific topic or keyword (limited to…
LOGIC BEHIND SIMPLE SIMPLE TIC-TAC-TOE GAME…..
“Is Python suitable for gaming?” The answer is, “It depends on the game.”
Python is actually quite capable at running games. It will likely even surprise you how much is possible in under 30 milliseconds. Still, it is not hard to reach the ceiling once your game begins to get more complex. Any game running in realtime will be making full use of the computer.
Over the past several years there has been an interesting trend in game development, the move towards higher level languages.
More recently, Python has been used in a variety…
Translate Any Indian Languages In Other Languages…
For the following program, we have to install the python package “translate”.
Translate is a simple but powerful translation tool written in python which supports for multiple translation providers.
This is integrated with Microsoft Translation API and Translated MyMemory API.
$ pip install translate
copy this & paste it into your cmd.
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…
from bs4 import BeautifulSoup as soup
from urllib.request import urlopennews_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: