Commit Graph

26 Commits

Author SHA1 Message Date
rlaphoenix c6c2e9ca51 Add Curl-Impersonate Downloader via curl_cffi project
The browser to imitate can be set in the config:

For example,
```yaml
curl_impersonate:
    browser: chrome110
```

It will default to using chrome110 if no value is set in the config.

A list of available Browsers are listed here: https://github.com/yifeikong/curl_cffi#sessions
2024-01-11 22:29:49 +00:00
rlaphoenix 86635f9b7f Add Support for Python 3.12, update dependencies 2023-12-02 21:17:41 +00:00
Shivelight c31ee338dc
Add option for automatic subtitle character encoding normalization (#68)
* Add option for automatic subtitle character encoding normalization

The rationale behind this function is that some services use ISO-8859-1
(latin1) or Windows-1252 (CP-1252) instead of UTF-8 encoding, whether
intentionally or accidentally. Some services even stream subtitles with
malformed/mixed encoding (each segment has a different encoding).

* Remove Subtitle parameter `auto_fix_encoding`

Just always attempt to fix encoding. If the subtitle is neither UTF-8 nor CP-1252, then it should realistically error out instead of producing garbage Subtitle data anyway.

* Move Subtitle encoding fixing code out of if drm tree

* Use chardet as a last ditch effort fixing Subs, or return original data

* Move Subtitle.fix_encoding method to utilities as try_ensure_utf8

* Add Shivelight as a contributor

---------

Co-authored-by: rlaphoenix <rlaphoenix@pm.me>
2023-12-02 11:00:55 +00:00
rlaphoenix 959590a6bb Overhaul tooling, linting, editor configs, and README 2023-12-02 09:57:13 +00:00
rlaphoenix a31cb6aa2f deps: Update all dependencies 2023-07-07 18:20:49 +01:00
rlaphoenix 89f5e04348 Bump requests from 2.28.2 to 2.31.0 2023-05-27 20:15:51 +01:00
rlaphoenix bf82065400 Move back to the official pymp4 dependency
All the latest changes in my fork is now available on the official pymp4 repository, and a new PyPI release v1.4.0 is available with the fixes to use.
2023-05-07 18:30:42 +01:00
rlaphoenix 2b07399f5a Update dependency on my fork of pymp4
It may look like I'm downgrading, but I'm not.

1.5.0 was an incorrect version bump based on TrueDread's fork. v1.4.0 is the next release after, even though it's a lower version. v1.4.0 should be used instead.
2023-04-23 22:36:41 +01:00
rlaphoenix bd40c38d23 Bump to v2.2.0 2023-04-23 18:38:47 +01:00
rlaphoenix 8c14b73bc1 Replace abandoned pymp4 with my fork of pymp4
My fork contains various fixes by beardypig and truedread that do not have a release on PyPI yet.
2023-03-27 18:41:28 +01:00
rlaphoenix df4dd73271 Bump to v2.1.0 2023-03-16 20:51:45 +00:00
rlaphoenix 111dac9264 Fix association of preceding HLS EXT-X-KEYs with m3u8 fork
This will improve efficiency and accuracy of getting appropriate DRM systems when downloading segments.

This can dramatically improve download speed from less than 50 kb/s to full speed if the HLS playlist used a lot of AES-128 EXT-X-KEYs. E.g., a unique key for each segment.

This was caused because the HLS.get_drm function took EVERY EXT-X-KEY, checked for supported systems, loaded them, and returned the supported objects. This meant it could load possibly 100s of AES-128 ClearKey objects (likely requiring URL downloads for the key URI) causing a huge delay before downloading each segment.
2023-03-09 21:46:48 +00:00
rlaphoenix eaf7752dde Bump to v2.0.1 2023-03-07 10:28:07 +00:00
rlaphoenix 46cb1ba0fa Bump to v2.0.0 2023-03-01 22:05:52 +00:00
rlaphoenix fb49210b5a Remove explicit dependency on colorama
It's not used by devine itself, but it's still a sub-dependency. Remove from being an explicit dependency in case the sub-dependencies ever remove it as well.
2023-03-01 08:35:42 +00:00
rlaphoenix a841dbe2ab Remove dependency on tqdm 2023-03-01 08:33:40 +00:00
rlaphoenix 8d626822cb Remove coloredlogs and now unused log constants 2023-02-25 11:46:03 +00:00
rlaphoenix 39ff347f58 Add new dependency, rich 13.3.1 2023-02-25 11:22:54 +00:00
rlaphoenix 0f0000bdd0 Bump to v1.4.0 2023-02-25 23:05:14 +00:00
rlaphoenix da1beae28f Bump to v1.3.1 2023-02-23 09:25:34 +00:00
rlaphoenix 2aea4549ce Bump to v1.3.0 2023-02-22 04:39:42 +00:00
rlaphoenix c1f716cb6c Drop support for Python 3.8 2023-02-22 03:43:22 +00:00
rlaphoenix be87d897e3 Bump to v1.2.0 2023-02-13 20:04:47 +00:00
rlaphoenix 71ded306b6 Bump to v1.1.0 2023-02-07 21:49:32 +00:00
rlaphoenix 8b9247bfc5 Fix the organization name across the project
Sadly `devine` was not available.
2023-02-06 02:55:22 +00:00
rlaphoenix 7fd87b8aa2 Initial commit 2023-02-06 02:41:29 +00:00