Created
February 22, 2019 02:35
-
-
Save rjchee/297fba7fd697ae6424e6028a1ecc09f6 to your computer and use it in GitHub Desktop.
Download videos
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
import os | |
import subprocess | |
import sys | |
import xml.etree.ElementTree as ET | |
with open(sys.argv[1], 'r') as rss: | |
et = ET.parse(rss) | |
root = et.getroot() | |
for name, url in zip((e.text for e in root.findall('./channel/item/title')), (e.attrib['url'] for e in root.findall('./channel/item/enclosure'))): | |
download_name = f"{name.replace(' ', '-')}.mp4" | |
if os.path.isfile(download_name): | |
print(f'Skipping {download_name} because it already exists') | |
else: | |
subprocess.run(['wget', f"-O{download_name}", url]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
StreamFab is a software which can download videos from 1000+sites, such us youtube, facebook, twitter,vime,etc.For example, method to download videos from tver please check out: tver ダウンロード pc