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

[ie] Do not test truth value of xml.etree.ElementTree.Element #8582

Merged
merged 5 commits into from
Nov 14, 2023

Conversation

bashonly
Copy link
Member

@bashonly bashonly commented Nov 14, 2023

Testing the truthiness of an xml.etree.ElementTree.Element instance is deprecated in py3.12

Refs:

Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

Copilot Summary

🤖 Generated by Copilot at b8d5508

Summary

🐛🧹🌐

Added XML parsing and error handling for various extractors that deal with XML-based formats or endpoints. Modified common.py to check for valid MPD responses before using them. Sorted imports in cbc.py for readability.

We parse the XML, we handle the errors
We extract the formats from the web of terrors
We defy the failures, we resist the invalid
We are the InfoExtractors, we are the metal avid

Walkthrough

  • Add xml.etree.ElementTree module to parse XML responses from some CBC, MTV, NBC and SlidesLive endpoints (link, link, link, link)
  • _find_secret_formats in CBCGemIE (link)
  • _extract_mpd_vod_duration in InfoExtractor (link)
  • _get_video_info in MTVServicesInfoExtractor (link)
  • _real_extract in NBCStationsIE (link)
  • _real_extract in SlidesLiveIE (link)

…ement`

Testing the truthiness of an `xml.etree.ElementTree.Element` instance is deprecated in py3.12

Authored by: bashonly
…ment`

Testing the truthiness of an `xml.etree.ElementTree.Element` instance is deprecated in py3.12

Authored by: bashonly
Testing the truthiness of an `xml.etree.ElementTree.Element` instance is deprecated in py3.12

Authored by: bashonly
Testing the truthiness of an `xml.etree.ElementTree.Element` instance is deprecated in py3.12

Authored by: bashonly
Testing the truthiness of an `xml.etree.ElementTree.Element` instance is deprecated in py3.12

Authored by: bashonly
@bashonly bashonly added the docs/meta/cleanup related to docs, code cleanup, templates, devscripts etc label Nov 14, 2023
@bashonly bashonly merged commit d4f14a7 into yt-dlp:master Nov 14, 2023
17 checks passed
@bashonly bashonly deleted the cleanup/download-xml branch December 7, 2023 15:09
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this pull request Apr 21, 2024
…lp#8582)

Testing the truthiness of an `xml.etree.ElementTree.Element` instance is deprecated in py3.12

Authored by: bashonly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs/meta/cleanup related to docs, code cleanup, templates, devscripts etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant