2 from __future__ import unicode_literals
7 from .common import InfoExtractor
10 class BuzzFeedIE(InfoExtractor):
11 _VALID_URL = r'https?://(?:www\.)?buzzfeed\.com/[^?#]*?/(?P<id>[^?#]+)'
13 'url': 'http://www.buzzfeed.com/abagg/this-angry-ram-destroys-a-punching-bag-like-a-boss?utm_term=4ldqpia',
15 'id': 'this-angry-ram-destroys-a-punching-bag-like-a-boss',
16 'title': 'This Angry Ram Destroys A Punching Bag Like A Boss',
17 'description': 'Rambro!',
23 'upload_date': '20141024',
24 'uploader_id': 'Buddhanz1',
25 'description': 'He likes to stay in shape with his heavy bag, he wont stop until its on the ground\n\nFollow Angry Ram on Facebook for regular updates -\nhttps://www.facebook.com/pages/Angry-Ram/1436897249899558?ref=hl',
26 'uploader': 'Buddhanz',
27 'title': 'Angry Ram destroys a punching bag',
32 def _real_extract(self, url):
33 playlist_id = self._match_id(url)
34 webpage = self._download_webpage(url, playlist_id)
36 all_buckets = re.findall(
37 r'<div class="video-embed-videopost[^"]*".*?rel:bf_bucket_data=\'([^\']+)\'',
40 for bd_json in all_buckets:
41 bd = json.loads(bd_json)
44 entries.append(self.url_result(bd['video']['url']))
49 'title': self._og_search_title(webpage),
50 'description': self._og_search_description(webpage),