This file contains 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" |
This file contains 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 twython import Twython | |
API_KEY = '<Your API key here>' | |
API_SECRET = '<Your API secret here>' | |
OAUTH_TOKEN = '<Your OAuth token here>' | |
OAUTH_SECRET = '<Your OAuth secret here>' | |
twitter = Twython(API_KEY, API_SECRET, OAUTH_TOKEN, OAUTH_SECRET) | |
twitter.update_status(status="I'm stressed") |