mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-20 05:47:24 +01:00
[PMVHaven] Follow guidelines with traverse_obj
This commit is contained in:
parent
4b701ce0f4
commit
2472bc97cd
@ -1,6 +1,7 @@
|
||||
import json
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..utils import traverse_obj
|
||||
|
||||
|
||||
class PMVHavenIE(InfoExtractor):
|
||||
@ -90,10 +91,10 @@ def _real_extract(self, url):
|
||||
|
||||
def transform(data):
|
||||
return {
|
||||
'id': data['_id'],
|
||||
'title': data['title'],
|
||||
'uploader': data['uploader'],
|
||||
'url': data['url'],
|
||||
'id': traverse_obj(data, ('_id')),
|
||||
'title': traverse_obj(data, ('title')),
|
||||
'uploader': traverse_obj(data, ('uploader')),
|
||||
'url': traverse_obj(data, ('url')),
|
||||
'thumbnails': [{'url': i} for i in data['thumbnails'] if i != 'placeholder'],
|
||||
}
|
||||
entries = map(transform, entries)
|
||||
|
Loading…
Reference in New Issue
Block a user