This module is used to capture images from YouTube live.
Näkymä Helsingistä location list
YouTube Capture Experiment
with youtube_dl.YoutubeDL(ydl_opts) as ydl: info = ydl.extract_info(nakyma_helsinkigista_youtube_live_url, download=False)for o in info['formats']:if o['resolution'] =='1280x720':print(o['url'])breakelse:raiseValueError("No 1280x720 format")
[youtube] Extracting URL: https://www.youtube.com/watch?v=LMZQ7eFhm58
[youtube] LMZQ7eFhm58: Downloading webpage
[youtube] LMZQ7eFhm58: Downloading ios player API JSON
[youtube] LMZQ7eFhm58: Downloading web creator player API JSON
[youtube] LMZQ7eFhm58: Downloading m3u8 information
https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1730307113/ei/yQ8iZ5iHJdO-0u8P17eRmAs/ip/87.92.255.37/id/LMZQ7eFhm58.4/itag/232/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/sgovp/gir%3Dyes%3Bitag%3D136/rqh/1/hdlc/1/hls_chunk_host/rr5---sn-qo5-ixas.googlevideo.com/xpc/EgVo2aDSNQ%3D%3D/playlist_duration/3600/manifest_duration/3600/vprv/1/playlist_type/DVR/initcwndbps/1496250/met/1730285513,/mh/l8/mm/44/mn/sn-qo5-ixas/ms/lva/mv/m/mvi/5/pl/18/rms/lva,lva/dover/13/pacing/0/short_key/1/keepalive/yes/fexp/51312688,51326931/mt/1730285070/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,sgovp,rqh,hdlc,xpc,playlist_duration,manifest_duration,vprv,playlist_type/sig/AJfQdSswRAIgLr4jfvDw0XhywuQ1ZEwplZY3zZxKUQSAaokJHm-7VGwCICbQLin1Ce8JzYwHRA3VQNdmBS5xZJkSeEHg--IyR-sy/lsparams/hls_chunk_host,initcwndbps,met,mh,mm,mn,ms,mv,mvi,pl,rms/lsig/ACJ0pHgwRgIhAKS5fsddQ9nO5yB2IvHECSfqA_XByQtR8rn7t3otlqo2AiEA6T5TC-5Tfm8jif778GkDSetVkAzukM-ltx9mRRjLdVE%3D/playlist/index.m3u8
[youtube] Extracting URL: https://www.youtube.com/watch?v=LMZQ7eFhm58
[youtube] LMZQ7eFhm58: Downloading webpage
[youtube] LMZQ7eFhm58: Downloading ios player API JSON
[youtube] LMZQ7eFhm58: Downloading web creator player API JSON
[youtube] LMZQ7eFhm58: Downloading m3u8 information
10.2024 1
10.2024 1
time data '10.2024 1' does not match format '%d.%m.%Y %H:%M:%S'
for i, o inenumerate(glob.glob("../data/f*.jpg")):try: new = Path("../data")/fname("cap_", *meta(o, True))print(i, o, " -> ", new) os.rename(o, new)exceptExceptionas e:print(o)