Created
May 28, 2018 15:50
-
-
Save s-c-p/be33fd41219b9c66e8aae91483c07f45 to your computer and use it in GitHub Desktop.
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 urllib.request import urlretrieve | |
title = "" | |
with open("youtube-urls.txt", mode='rt') as i: | |
for url in i: | |
urlretrieve(url, "temp.txt") | |
with open("temp.txt", mode="rt") as t: | |
con = t.read() | |
kv = con.split("&") | |
for p in kv: | |
if p.startswith("title="): | |
title = p | |
break | |
print(title) | |
with open("temp.txt", mode="wt") as t: | |
pass | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment