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

Processing chapters does not work. #369

Open
thedangler opened this issue Dec 3, 2024 · 1 comment
Open

Processing chapters does not work. #369

thedangler opened this issue Dec 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@thedangler
Copy link

thedangler commented Dec 3, 2024

❗ DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE ❗

lack of information will lead to closure of the issue


Describe the bug
Chatpers are empty when using yt.chapters.


code that was used that resulted in the bug

from pytubefix import YouTube
print(yt.chapters)

Expected behavior

Chapters should be printed out.
When stepping through the code line 534 of main.py is never true because
if marker['key'].upper() == 'DESCRIPTION_CHAPTERS':
is never true.

DESCRIPTION_CHAPTERS key doesn't exist when returning the markers_map.

Two keys were returned 'AUTO_CHAPTERS' and 'ANIMATION_ANNOTATION_MARKERS'

Changing DESCRIPTION_CHAPTERS to AUTO_CHAPTERS worked.


Desktop (please complete the following information):

  • OS: macOS
  • Python Version [3.11]
  • Pytubefix Version [8.7]

Additional context
Add any other context about the problem here.

@thedangler thedangler added the bug Something isn't working label Dec 3, 2024
@neurite
Copy link

neurite commented Dec 14, 2024

I think we are looking at 2 types of chapters here: one type that are created by the author (as already covered by the original code) and one type that are auto-generated by YouTube (as you are reporting here). The question is whether we treat them the same or we add a 2nd type for auto-chapters. I am leaning toward the latter so that we do not lose the fine-grained differentiation between the 2 types of chapters. If so, this is more like a new feature that may require further discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: waiting
Development

No branches or pull requests

2 participants