Comments (6)
According to the benchmarks on ciso8601
, it's a significant improvement over iso8601
(almost 100x), but compared to the built-in function it's a lot closer, so the need to change that should go down a lot with this change and would still be completely possible
from m3u8.
Looks like this isn't a viable solution until Python 3.11 so I'm guessing this needs to wait
from m3u8.
One thing to consider: if you do performance profiling, you'll find that date parsing is one of the slowest things this library does. The ciso8601
package is a C extension that speeds up this process greatly.
Right now it's easy to patch in ciso8601
for iso8601
(m3u8.parser.cast_date_time = ciso8601.parse_datetime
).
I support dropping the iso8601
dependency, but it would be good to maintain the ability to patch in ciso8601
.
from m3u8.
On a semi-related note, I added a PR for adding 3.12 to the list of tested versions and I noticed that ciso8601
doesn't have wheel packages for that yet, so it would need to be built from source until those are added
from m3u8.
FWIW, there is also the option of using backports.datetime_fromisoformat
, which brings Python 3.11's parsing code to older versions of Python 3 (with pre-built wheels and high-performance).
from m3u8.
I did another version of my PR that uses the built-in on 3.11 and later, but I really liked the idea of using the backports (for the consistent implementation and performance improvement), so I added that to the PR as well. Thanks for the suggestion!
from m3u8.
Related Issues (20)
- Quotation marks are still in VIDEO-RANGE property
- Add type hints HOT 2
- Error when parsing extended M3U playlists with custom attrubutes HOT 2
- Inheriting from object class HOT 3
- Wrongfully parsing custom tag as URI instead of ignoring it HOT 4
- How to open a HLS (.m3u8) video stream link in Telegram HOT 1
- How to get EXT-X-MAP from m3u8 object? HOT 1
- installation broken. HOT 4
- Empty duration default/exception HOT 1
- Can't dump playlist with custom tags HOT 10
- M3u8 Support to be played in IPTV Player HOT 1
- Fails to parse manifests with Elemental-style CUE-OUT-CONT tags HOT 6
- Having Trouble With Putting A M3U Stream In A M3U8 Link HOT 2
- Iframe streams are not parsed correctly HOT 2
- The method of calculating absolute_uri may be confusing. Adding a custom calculation method may be better. HOT 2
- IPTV example for custom tags has problems woth properties that might contain comma
- video
- RESOLUTION as float raises exception HOT 4
- Parse bugs HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from m3u8.