Skip to content

Instantly share code, notes, and snippets.

@bertez
Created April 16, 2015 12:38
Show Gist options
  • Save bertez/ff53a2ef5a05f974dc49 to your computer and use it in GitHub Desktop.
Save bertez/ff53a2ef5a05f974dc49 to your computer and use it in GitHub Desktop.
Download video info from vimeo channel RSS to JSON
#pip install feedparser
import feedparser
import json
import re
rss_url = 'https://vimeo.com/channels/871426/videos/rss' #your channel rss url
d = feedparser.parse(rss_url)
videos = []
for item in d['items']:
video = {}
video['title'] = item['title']
video['text'] = re.sub('<[^<]+?>', '', item['description'])
video['link'] = item['link']
videos.append(video)
with file('videos.json', 'w') as fp:
json.dump(videos, fp)
@pr3ssh
Copy link

pr3ssh commented Apr 16, 2015

Simple but great code...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment