mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-11-26 11:31:07 +01:00
[ie/GoogleDrive] Fix source file extraction (#8990)
Closes #8976 Authored by: jazz1611
This commit is contained in:
parent
393b487a4e
commit
5498729c59
@ -19,9 +19,9 @@ class GoogleDriveIE(InfoExtractor):
|
|||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
https?://
|
https?://
|
||||||
(?:
|
(?:
|
||||||
(?:docs|drive)\.google\.com/
|
(?:docs|drive|drive\.usercontent)\.google\.com/
|
||||||
(?:
|
(?:
|
||||||
(?:uc|open)\?.*?id=|
|
(?:uc|open|download)\?.*?id=|
|
||||||
file/d/
|
file/d/
|
||||||
)|
|
)|
|
||||||
video\.google\.com/get_player\?.*?docid=
|
video\.google\.com/get_player\?.*?docid=
|
||||||
@ -53,6 +53,9 @@ class GoogleDriveIE(InfoExtractor):
|
|||||||
}, {
|
}, {
|
||||||
'url': 'https://drive.google.com/uc?id=0B2fjwgkl1A_CX083Tkowdmt6d28',
|
'url': 'https://drive.google.com/uc?id=0B2fjwgkl1A_CX083Tkowdmt6d28',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
}, {
|
||||||
|
'url': 'https://drive.usercontent.google.com/download?id=0ByeS4oOUV-49Zzh4R1J6R09zazQ',
|
||||||
|
'only_matching': True,
|
||||||
}]
|
}]
|
||||||
_FORMATS_EXT = {
|
_FORMATS_EXT = {
|
||||||
'5': 'flv',
|
'5': 'flv',
|
||||||
@ -205,9 +208,10 @@ class GoogleDriveIE(InfoExtractor):
|
|||||||
formats.append(f)
|
formats.append(f)
|
||||||
|
|
||||||
source_url = update_url_query(
|
source_url = update_url_query(
|
||||||
'https://drive.google.com/uc', {
|
'https://drive.usercontent.google.com/download', {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'export': 'download',
|
'export': 'download',
|
||||||
|
'confirm': 't',
|
||||||
})
|
})
|
||||||
|
|
||||||
def request_source_file(source_url, kind, data=None):
|
def request_source_file(source_url, kind, data=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user