Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ app = Flask(__name__)
|
|
| 6 |
|
| 7 |
def download_video(url, resolution):
|
| 8 |
try:
|
| 9 |
-
yt = YouTube(url)
|
| 10 |
stream = yt.streams.filter(progressive=True, file_extension='mp4', resolution=resolution).first()
|
| 11 |
if stream:
|
| 12 |
stream.download()
|
|
@@ -20,7 +20,7 @@ def download_video(url, resolution):
|
|
| 20 |
|
| 21 |
def get_video_info(url):
|
| 22 |
try:
|
| 23 |
-
yt = YouTube(url)
|
| 24 |
video_info = {
|
| 25 |
"title": yt.title,
|
| 26 |
"author": yt.author,
|
|
|
|
| 6 |
|
| 7 |
def download_video(url, resolution):
|
| 8 |
try:
|
| 9 |
+
yt = YouTube(url, use_po_token=True)
|
| 10 |
stream = yt.streams.filter(progressive=True, file_extension='mp4', resolution=resolution).first()
|
| 11 |
if stream:
|
| 12 |
stream.download()
|
|
|
|
| 20 |
|
| 21 |
def get_video_info(url):
|
| 22 |
try:
|
| 23 |
+
yt = YouTube(url, use_po_token=True)
|
| 24 |
video_info = {
|
| 25 |
"title": yt.title,
|
| 26 |
"author": yt.author,
|