[GH-ISSUE #660] parse_duration fails for very long videos #439

Closed
opened 2026-02-27 23:00:48 +03:00 by kerem · 1 comment
Owner

Originally created by @abhishekmj303 on GitHub (Oct 10, 2024).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/660

Describe the bug
get_playlist fails when the playlist contains very long videos like this. These are basically streams converted to videos.

The above mentioned duration is: 13,165:23:44

To Reproduce
Steps to reproduce the behavior:

  1. Call get_playlist("PLfuGZPdCf-K_65ebc5u1yc5WonSf5HOXk")
  2. Get error:
/lib/python3.11/site-packages/ytmusicapi/parsers/_utils.py", line 71, in <genexpr>
    seconds = sum(multiplier * int(time) for multiplier, time in mapped_increments)
                               ^^^^^^^^^
ValueError: invalid literal for int() with base 10: '13,165'
Originally created by @abhishekmj303 on GitHub (Oct 10, 2024). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/660 **Describe the bug** `get_playlist` fails when the playlist contains very long videos like [this](https://www.youtube.com/watch?v=hHW1oY26kxQ&list=PLfuGZPdCf-K_65ebc5u1yc5WonSf5HOXk&index=264&pp=iAQB8AUB). These are basically streams converted to videos. The above mentioned duration is: `13,165:23:44` **To Reproduce** Steps to reproduce the behavior: 1. Call `get_playlist("PLfuGZPdCf-K_65ebc5u1yc5WonSf5HOXk")` 2. Get error: ``` /lib/python3.11/site-packages/ytmusicapi/parsers/_utils.py", line 71, in <genexpr> seconds = sum(multiplier * int(time) for multiplier, time in mapped_increments) ^^^^^^^^^ ValueError: invalid literal for int() with base 10: '13,165' ```
kerem 2026-02-27 23:00:48 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@sigma67 commented on GitHub (Oct 10, 2024):

Wow... that's certainly an edge case I didn't expect

<!-- gh-comment-id:2404154550 --> @sigma67 commented on GitHub (Oct 10, 2024): Wow... that's certainly an edge case I didn't expect
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#439
No description provided.