Skip to content

Commit

Permalink
gpodder.plugins.vimeo: Fix Vimeo feed discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
thp committed Jun 14, 2015
1 parent 9d5161d commit 5b114f2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/gpodder/plugins/vimeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@

import re

VIMEOCOM_RE = re.compile(r'http://vimeo\.com/(\d+)$', re.IGNORECASE)
VIMEOCHANNEL_RE = re.compile(r'http://vimeo\.com/((channels/)?[a-z0-9]+)[/]?$', re.IGNORECASE)
MOOGALOOP_RE = re.compile(r'http://vimeo\.com/moogaloop\.swf\?clip_id=(\d+)$', re.IGNORECASE)
VIMEOCOM_RE = re.compile(r'http[s]?://vimeo\.com/(\d+)$', re.IGNORECASE)
VIMEOCHANNEL_RE = re.compile(r'http[s]?://vimeo\.com/(channels/[^/]+|\d+)$', re.IGNORECASE)
MOOGALOOP_RE = re.compile(r'http[s]?://vimeo\.com/moogaloop\.swf\?clip_id=(\d+)$', re.IGNORECASE)
VIMEO_VIDEO_RE = re.compile(r'http[s]?://vimeo.com/channels/(?:[^/])+/(\d+)$', re.IGNORECASE)
SIGNATURE_RE = re.compile(r'"timestamp":(\d+),"signature":"([^"]+)"')
DATA_CONFIG_RE = re.compile(r'data-config-url="([^"]+)"')

Expand Down Expand Up @@ -99,6 +100,10 @@ def get_vimeo_id(url):
if result is not None:
return result.group(1)

result = VIMEO_VIDEO_RE.match(url)
if result is not None:
return result.group(1)

return None


Expand Down

0 comments on commit 5b114f2

Please sign in to comment.