Skip to content

Instantly share code, notes, and snippets.

@viticci
Created January 21, 2016 21:41
Show Gist options
  • Save viticci/b27acfeb04c25101e4ea to your computer and use it in GitHub Desktop.
Save viticci/b27acfeb04c25101e4ea to your computer and use it in GitHub Desktop.
YouTubeRSS.py
from bs4 import BeautifulSoup
import urllib2
import appex
import dialogs
import clipboard
channel = appex.get_url()
webpage = urllib2.urlopen(channel)
soup = parser(webpage)
feeds = soup.findAll("link", rel="alternate")
for RSS_link in feeds:
url = RSS_link.get("href", None)
if 'feeds' in url:
dialogs.alert('Found Channel RSS', url, 'Copy')
clipboard.set(url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment