Compare commits

...

8 Commits

Author SHA1 Message Date
upintheairsheep
b43f68e299
Merge 42111f3a17 into e1b3fa242c 2024-07-28 01:38:31 +09:00
upintheairsheep
42111f3a17
Update googlephotos.py 2023-03-09 12:43:44 -08:00
upintheairsheep
ff7876afec
Fix 404 2023-02-22 09:37:49 -08:00
upintheairsheep
8ec63c3f81
Update youtube_dl/extractor/googlephotos.py
Co-authored-by: dirkf <fieldhouse@gmx.net>
2023-02-22 09:28:30 -08:00
upintheairsheep
f6c7cda93a
Update youtube_dl/extractor/googlephotos.py
thanks again

Co-authored-by: dirkf <fieldhouse@gmx.net>
2023-02-22 09:28:18 -08:00
upintheairsheep
b44a9afcfc
Update youtube_dl/extractor/googlephotos.py
Co-authored-by: dirkf <fieldhouse@gmx.net>
2023-02-22 09:28:03 -08:00
upintheairsheep
0842d4d7d7
Add the actual extractor 2023-02-21 09:08:36 -08:00
upintheairsheep
8b2b336337
Add GooglePhotosIE from tokune's ytdl fork 2023-02-21 09:07:14 -08:00
2 changed files with 44 additions and 0 deletions

View File

@ -466,6 +466,7 @@ from .go import GoIE
from .godtube import GodTubeIE from .godtube import GodTubeIE
from .golem import GolemIE from .golem import GolemIE
from .googledrive import GoogleDriveIE from .googledrive import GoogleDriveIE
from .googlephotos import GooglePhotosIE
from .googlepodcasts import ( from .googlepodcasts import (
GooglePodcastsIE, GooglePodcastsIE,
GooglePodcastsFeedIE, GooglePodcastsFeedIE,

View File

@ -0,0 +1,43 @@
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class GooglePhotosIE(InfoExtractor):
_VALID_URL = r'https?://photos\.google\.com/share/(.+?)/photo/(.+?)key=(?P<id>.*)'
_TEST = {
'url': 'https://photos.google.com/share/AF1QipO4IcvSjf_niq1icqPYPBK50FAsKWniuyVY7Mx8sMIDKZGb71hkUi6ZK9hgIFX-mQ/photo/AF1QipNewPmRaMZquiCgyNtz4McqeLBdkXLugNB3ov6_?key=RUhSeEVVajdhcTVic3o2Wk1URWlVZEtRdnRoaTl3',
'md5': 'TODO: md5 sum of the first 10241 bytes of the video file (use --test)',
'info_dict': {
'id': 'AF1QipNewPmRaMZquiCgyNtz4McqeLBdkXLugNB3ov6_',
'ext': 'mp4',
'title': 'GooglePhotosVideo',
}
}
_formats = YoutubeIE._formats
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
dash_formats = {}
formats = []
dash_mpd_fatal = True
dash_link = self._search_regex(r'''data-url\s*=\s*('|")(?P<link>(?:(?!\1).)+)''', webpage, group='link')
mpd_url = self._download_webpage(dash_link + '=mm,dash?alr=true', video_id)
for df in self._extract_mpd_formats(
mpd_url, video_id, fatal=dash_mpd_fatal,
formats_dict=self._formats):
dash_formats.setdefault(df['format_id'], df)
self._sort_formats(formats)
return {
'id': video_id,
'title': 'GooglePhotosVideo',
'formats': formats,
}