Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[youtube] Support --download-sections with formats --live-from-start #6498

Open
wants to merge 70 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
2fbd6de
[utils] Add hackish 'now' support for --download-sections
elyse0 Mar 9, 2023
439be2b
[utils] Add microseconds to unified_timestamp
Oct 21, 2022
367429e
[common] Extract start and end keys for Dash fragments
elyse0 Mar 9, 2023
1799a6a
[utils] Allow using local timezone for 'now' timestamps
elyse0 Mar 9, 2023
fdb9aaf
Use local timezone for download sections
elyse0 Mar 9, 2023
b83d752
Add fixme in modified parse_chapters function
elyse0 Mar 9, 2023
fba1c39
[youtube] Support --download-sections for YT Livestream from start
elyse0 Mar 9, 2023
e42e256
Create last_segment_url only if necessary
elyse0 Mar 10, 2023
317ba03
Improve parse_chapters comments
elyse0 Mar 10, 2023
9327587
Fix linter
elyse0 Mar 10, 2023
e3b08ba
[extractor/iq] Set more language codes (#6476)
D0LLYNH0 Mar 9, 2023
8df4707
[extractor/opencast] Add ltitools to `_VALID_URL` (#6371)
C0D3D3V Mar 9, 2023
c376b95
[downloader/curl] Fix progress reporting
pukkandan Mar 9, 2023
2d16554
[extractor/youtube] Bypass throttling for `-f17`
pukkandan Mar 9, 2023
c222f6c
[extractor/twitch] Fix `is_live` (#6500)
elyse0 Mar 10, 2023
96f5d29
[extractor/cbc:gem] Update `_VALID_URL` (#6499)
makew0rld Mar 10, 2023
34d3df7
Support loading info.json with a list at it's root
pukkandan Mar 10, 2023
9f717b6
[extractor/hidive] Fix login
pukkandan Mar 10, 2023
e3ffdf7
[extractor/opencast] Fix format bug (#6512)
C0D3D3V Mar 11, 2023
f137666
[extractor/rokfin] Re-construct manifest url (#6507)
vampirefrog Mar 11, 2023
db62ffd
[extractor/youtube] Add client name to `format_note` when `-v` (#6254)
Lesmiscore Mar 11, 2023
5ef1a92
[extractor/youtube] Add extractor-arg `include_duplicate_formats`
pukkandan Mar 9, 2023
9fc70f3
[extractor/youtube] Construct fragment list lazily
pukkandan Mar 11, 2023
e6e2eb0
Support negative durations
elyse0 Mar 10, 2023
e40132d
Revert "[utils] Allow using local timezone for 'now' timestamps"
elyse0 Mar 10, 2023
0ed9a73
Add fragment count
elyse0 Mar 10, 2023
a43ba2e
Fix unified_timestamp
elyse0 Mar 12, 2023
cdac764
Remove tz_aware date code
elyse0 Mar 12, 2023
fbae888
Add debug for selected section
elyse0 Mar 12, 2023
3faa1e3
Add initial documentation
elyse0 Mar 12, 2023
79ae58a
Fix linter
elyse0 Mar 12, 2023
5e4699a
Fix linter
elyse0 Mar 12, 2023
6cea8cb
Merge remote-tracking branch 'origin/master' into pr/6498
pukkandan Mar 12, 2023
544836d
Allow days in parse_duration
elyse0 Mar 12, 2023
b131f3d
Improve option documentation
elyse0 Mar 12, 2023
2fbe185
Add some documentation
elyse0 Mar 12, 2023
01f672f
Lock less agressively
elyse0 Mar 18, 2023
129555b
Fix return values of _extract_sequence_from_mpd
elyse0 Mar 18, 2023
128d304
Always compute last_seq
elyse0 Apr 19, 2023
7f93eb7
Support for epoch timestamps
elyse0 May 7, 2023
78285ee
Update options docs
elyse0 May 7, 2023
4e93198
Restore README.md
elyse0 May 7, 2023
444e02e
Merge remote-tracking branch 'origin/master' into yt-live-from-start-…
elyse0 May 7, 2023
8ee942a
Add warning about --download-sections without --live-from-start
elyse0 May 13, 2023
1f79746
Merge remote-tracking branch 'origin' into yt-live-from-start-range
elyse0 Jun 3, 2023
99e6074
Merge remote-tracking branch 'origin' into yt-live-from-start-range
elyse0 Jun 24, 2023
622c555
Fix bug after merge
elyse0 Jun 24, 2023
1416cee
Update yt_dlp/options.py
bashonly Jul 22, 2023
194bc49
Merge branch 'yt-dlp:master' into pr/6498
bashonly Jul 22, 2023
bd73047
Cleanup
bashonly Jul 22, 2023
2741b58
Merge remote-tracking branch 'origin' into yt-live-from-start-range
elyse0 Oct 8, 2023
fb2b57a
Merge remote-tracking branch 'github/yt-live-from-start-range' into y…
elyse0 Oct 8, 2023
5156a16
Merge branch 'master' into yt-live-from-start-range
bashonly Jan 19, 2024
6fc6349
Merge branch 'master' into yt-live-from-start-range
bashonly Feb 29, 2024
50c943e
Merge branch 'yt-dlp:master' into pr/yt-live-from-start-range
bashonly Mar 19, 2024
cf96b24
Merge branch 'master' into yt-live-from-start-range
bashonly Apr 16, 2024
172dfbe
Merge branch 'yt-dlp:master' into pr/live-sections
bashonly May 10, 2024
54ad67d
Merge branch 'yt-dlp:master' into pr/live-sections
bashonly May 23, 2024
6a84199
Merge branch 'yt-dlp:master' into pr/live-sections
bashonly May 28, 2024
6208f7b
Merge branch 'master' into yt-live-from-start-range
bashonly Jun 12, 2024
66a6e0a
Merge branch 'yt-dlp:master' into pr/live-sections
bashonly Jul 8, 2024
724a6cb
Merge branch 'yt-dlp:master' into pr/live-sections
bashonly Jul 11, 2024
4f1af12
Merge branch 'master' into pr/live-sections
bashonly Jul 21, 2024
c0be43d
Merge branch 'yt-dlp:master' into pr/live-sections
bashonly Jul 25, 2024
160d973
Merge branch 'master' into yt-live-from-start-range
bashonly Aug 17, 2024
9dd8574
Merge branch 'master' into yt-live-from-start-range
bashonly Oct 9, 2024
e05694e
Merge branch 'yt-dlp:master' into pr/live-sections
bashonly Oct 26, 2024
670bafe
Merge branch 'yt-dlp:master' into pr/live-sections
bashonly Nov 7, 2024
03eee53
Merge branch 'yt-dlp:master' into pr/live-sections
bashonly Dec 6, 2024
7d101c8
Merge branch 'yt-dlp:master' into pr/live-sections
bashonly Dec 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve parse_chapters comments
  • Loading branch information
elyse0 committed Mar 10, 2023
commit 317ba03fdf4c0ef16ff11fe84d8ce3a7bb767965
5 changes: 3 additions & 2 deletions yt_dlp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,10 @@ def validate_outtmpl(tmpl, msg):

def parse_chapters(name, value):
def parse_timestamp(x):
# FIXME: This should be smarter, e.g. 'inf-1day'?
# FIXME: Maybe there's a better way to remove parenthesis
x = x.replace('(', '').replace(')', '')

# FIXME: This should be smarter, e.g. 'inf-1day'?
if x in ('inf', 'infinite'):
return float('inf')

Expand All @@ -337,7 +338,7 @@ def parse_timestamp(x):
for regex in value or []:
if regex.startswith('*'):
for range_ in map(str.strip, regex[1:].split(',')):
# FIXME: This is really sensible
# FIXME: This should match correctly '(now-1hour)-(now-20minutes)'
mobj = range_ != '-' and re.fullmatch(r'(.+)?\s*-\s*(.+)?', range_)
dur = mobj and (parse_timestamp(mobj.group(1) or '0'), parse_timestamp(mobj.group(2) or 'inf'))
if None in (dur or [None]):
Expand Down