1 from .common
import InfoExtractor
2 from ..utils
import int_or_none
5 class LiveJournalIE(InfoExtractor
):
6 _VALID_URL
= r
'https?://(?:[^.]+\.)?livejournal\.com/video/album/\d+.+?\bid=(?P<id>\d+)'
8 'url': 'https://andrei-bt.livejournal.com/video/album/407/?mode=view&id=51272',
9 'md5': 'adaf018388572ced8a6f301ace49d4b2',
13 'title': 'Истребители против БПЛА',
14 'upload_date': '20190624',
15 'timestamp': 1561406715,
19 def _real_extract(self
, url
):
20 video_id
= self
._match
_id
(url
)
21 webpage
= self
._download
_webpage
(url
, video_id
)
22 record
= self
._parse
_json
(self
._search
_regex
(
23 r
'Site\.page\s*=\s*({.+?});', webpage
,
24 'page data'), video_id
)['video']['record']
25 storage_id
= str(record
['storageid'])
26 title
= record
.get('name')
28 # remove filename extension(.mp4, .mov, etc...)
29 title
= title
.rsplit('.', 1)[0]
31 '_type': 'url_transparent',
34 'thumbnail': record
.get('thumbnail'),
35 'timestamp': int_or_none(record
.get('timecreate')),
36 'url': 'eagleplatform:vc.videos.livejournal.com:' + storage_id
,
37 'ie_key': 'EaglePlatform',