From 60ff4f270f46f8b9a9168ce3c535c0cd15183a47 Mon Sep 17 00:00:00 2001 From: Lam Date: Mon, 20 Apr 2020 20:34:41 +0200 Subject: [PATCH] Revert "[livejournal] Add new extractor(closes #21526)" This reverts commit a21be7ca97a217495b83f5d056793c342e923036. --- youtube_dl/extractor/extractors.py | 1 - youtube_dl/extractor/livejournal.py | 42 ----------------------------- 2 files changed, 43 deletions(-) delete mode 100644 youtube_dl/extractor/livejournal.py diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index 75a53f54bdf4..e88ad34a8597 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -579,7 +579,6 @@ ) from .linuxacademy import LinuxAcademyIE from .litv import LiTVIE -from .livejournal import LiveJournalIE from .liveleak import ( LiveLeakIE, LiveLeakEmbedIE, diff --git a/youtube_dl/extractor/livejournal.py b/youtube_dl/extractor/livejournal.py deleted file mode 100644 index 3a9f4553f464..000000000000 --- a/youtube_dl/extractor/livejournal.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 -from __future__ import unicode_literals - -from .common import InfoExtractor -from ..compat import compat_str -from ..utils import int_or_none - - -class LiveJournalIE(InfoExtractor): - _VALID_URL = r'https?://(?:[^.]+\.)?livejournal\.com/video/album/\d+.+?\bid=(?P\d+)' - _TEST = { - 'url': 'https://andrei-bt.livejournal.com/video/album/407/?mode=view&id=51272', - 'md5': 'adaf018388572ced8a6f301ace49d4b2', - 'info_dict': { - 'id': '1263729', - 'ext': 'mp4', - 'title': 'Истребители против БПЛА', - 'upload_date': '20190624', - 'timestamp': 1561406715, - } - } - - def _real_extract(self, url): - video_id = self._match_id(url) - webpage = self._download_webpage(url, video_id) - record = self._parse_json(self._search_regex( - r'Site\.page\s*=\s*({.+?});', webpage, - 'page data'), video_id)['video']['record'] - storage_id = compat_str(record['storageid']) - title = record.get('name') - if title: - # remove filename extension(.mp4, .mov, etc...) - title = title.rsplit('.', 1)[0] - return { - '_type': 'url_transparent', - 'id': video_id, - 'title': title, - 'thumbnail': record.get('thumbnail'), - 'timestamp': int_or_none(record.get('timecreate')), - 'url': 'eagleplatform:vc.videos.livejournal.com:' + storage_id, - 'ie_key': 'EaglePlatform', - }