Compare commits

..

15 Commits

Author SHA1 Message Date
√(noham)²
cbb4a2ad63 Merge pull request #20 from NohamR/dependabot/pip/aiohttp-3.14.1
Bump aiohttp from 3.13.5 to 3.14.1
2026-06-28 14:48:42 +02:00
√(noham)²
a8f7f91305 Merge pull request #21 from NohamR/dependabot/pip/python-dotenv-1.2.2
Bump python-dotenv from 1.2.1 to 1.2.2
2026-06-28 14:48:33 +02:00
√(noham)²
6027190194 Merge pull request #22 from NohamR/dependabot/pip/requests-2.34.2
Bump requests from 2.32.5 to 2.34.2
2026-06-28 14:48:22 +02:00
√(noham)²
f7729dcd2f Merge branch 'main' into dependabot/pip/requests-2.34.2 2026-06-28 14:48:13 +02:00
√(noham)²
0054e70257 Merge pull request #23 from NohamR/dependabot/pip/tabulate-0.10.0
Bump tabulate from 0.9.0 to 0.10.0
2026-06-28 14:47:40 +02:00
dependabot[bot]
b566360abf Bump tabulate from 0.9.0 to 0.10.0
Bumps [tabulate](https://github.com/astanin/python-tabulate) from 0.9.0 to 0.10.0.
- [Changelog](https://github.com/astanin/python-tabulate/blob/master/CHANGELOG)
- [Commits](https://github.com/astanin/python-tabulate/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: tabulate
  dependency-version: 0.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-28 06:52:53 +00:00
dependabot[bot]
c534ba9357 Bump requests from 2.32.5 to 2.34.2
Bumps [requests](https://github.com/psf/requests) from 2.32.5 to 2.34.2.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.32.5...v2.34.2)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.34.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-28 06:52:50 +00:00
dependabot[bot]
3336477824 Bump python-dotenv from 1.2.1 to 1.2.2
Bumps [python-dotenv](https://github.com/theskumar/python-dotenv) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/theskumar/python-dotenv/releases)
- [Changelog](https://github.com/theskumar/python-dotenv/blob/main/CHANGELOG.md)
- [Commits](https://github.com/theskumar/python-dotenv/compare/v1.2.1...v1.2.2)

---
updated-dependencies:
- dependency-name: python-dotenv
  dependency-version: 1.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-28 06:52:43 +00:00
dependabot[bot]
67986279f1 Bump aiohttp from 3.13.5 to 3.14.1
---
updated-dependencies:
- dependency-name: aiohttp
  dependency-version: 3.14.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-28 06:52:39 +00:00
√(noham)²
ff8462d3df Times + logging changes 2026-06-23 18:31:50 +02:00
√(noham)²
51a58d3694 Add tzdata 2026-06-22 11:17:16 +02:00
√(noham)²
4d613a1b3f Merge pull request #18 from NohamR/dependabot/pip/tqdm-4.68.3
Bump tqdm from 4.68.2 to 4.68.3
2026-06-21 14:49:42 +02:00
√(noham)²
cd5c19793f Merge pull request #19 from NohamR/dependabot/uv/tqdm-4.68.3
Bump tqdm from 4.68.2 to 4.68.3
2026-06-21 14:49:30 +02:00
dependabot[bot]
297e8d7f59 Bump tqdm from 4.68.2 to 4.68.3
Bumps [tqdm](https://github.com/tqdm/tqdm) from 4.68.2 to 4.68.3.
- [Release notes](https://github.com/tqdm/tqdm/releases)
- [Commits](https://github.com/tqdm/tqdm/compare/v4.68.2...v4.68.3)

---
updated-dependencies:
- dependency-name: tqdm
  dependency-version: 4.68.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-21 06:52:30 +00:00
dependabot[bot]
9d0da79cf0 Bump tqdm from 4.68.2 to 4.68.3
Bumps [tqdm](https://github.com/tqdm/tqdm) from 4.68.2 to 4.68.3.
- [Release notes](https://github.com/tqdm/tqdm/releases)
- [Commits](https://github.com/tqdm/tqdm/compare/v4.68.2...v4.68.3)

---
updated-dependencies:
- dependency-name: tqdm
  dependency-version: 4.68.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-21 06:52:27 +00:00
6 changed files with 32 additions and 18 deletions

View File

@@ -26,6 +26,7 @@ from utils.times import (
convert_sec_to_date, convert_sec_to_date,
find_nearest_tick_by_hour, find_nearest_tick_by_hour,
bruteforce, bruteforce,
TIMESCALE,
) )
from utils.stream import ( from utils.stream import (
save_segments, save_segments,
@@ -38,7 +39,6 @@ from utils.stream import (
from utils.logging_config import setup_logging, logger from utils.logging_config import setup_logging, logger
load_dotenv() load_dotenv()
TIMESCALE = 90000
DURATION = 288000 DURATION = 288000
@@ -71,7 +71,7 @@ def parse_arguments():
parser.add_argument( parser.add_argument(
"--title", "--title",
type=str, type=str,
default="title", default=None,
help="Title for the download (default: channel_id_start_date)", help="Title for the download (default: channel_id_start_date)",
) )
parser.add_argument("--username", type=str, help="Oqee username for authentication") parser.add_argument("--username", type=str, help="Oqee username for authentication")

View File

@@ -17,7 +17,8 @@ dependencies = [
"pywidevine>=1.9.0", "pywidevine>=1.9.0",
"requests>=2.32.5", "requests>=2.32.5",
"tabulate>=0.9.0", "tabulate>=0.9.0",
"tqdm>=4.68.2", "tqdm>=4.68.3",
"tzdata>=2026.2",
] ]
[project.scripts] [project.scripts]

View File

@@ -1,7 +1,7 @@
aiohttp==3.13.5 aiohttp==3.14.1
InquirerPy==0.3.4 InquirerPy==0.3.4
python-dotenv==1.2.1 python-dotenv==1.2.2
pywidevine==1.9.0 pywidevine==1.9.0
Requests==2.32.5 Requests==2.34.2
tabulate==0.9.0 tabulate==0.10.0
tqdm==4.68.2 tqdm==4.68.3

View File

@@ -9,6 +9,7 @@ from InquirerPy.base.control import Choice
from utils.stream import get_manifest, parse_mpd_manifest, organize_by_content_type from utils.stream import get_manifest, parse_mpd_manifest, organize_by_content_type
from utils.logging_config import logger from utils.logging_config import logger
from utils.times import FRANCE_TZ
SERVICE_PLAN_API_URL = "https://api.oqee.net/api/v6/service_plan" SERVICE_PLAN_API_URL = "https://api.oqee.net/api/v6/service_plan"
EPG_API_URL = "https://api.oqee.net/api/v1/epg/all/{unix}" EPG_API_URL = "https://api.oqee.net/api/v1/epg/all/{unix}"
@@ -484,7 +485,7 @@ def get_epg_data_at(dt: datetime.datetime):
else: else:
dt_aligned = dt.replace(minute=0, second=0, microsecond=0) dt_aligned = dt.replace(minute=0, second=0, microsecond=0)
unix_time = int(dt_aligned.timestamp()) unix_time = int(dt_aligned.replace(tzinfo=FRANCE_TZ).timestamp())
logger.info("Fetching EPG for aligned time: %s (unix=%d)", dt_aligned, unix_time) logger.info("Fetching EPG for aligned time: %s (unix=%d)", dt_aligned, unix_time)
try: try:
@@ -533,8 +534,8 @@ def select_program_from_epg(programs, original_start_date, original_end_date):
# Extract the live data from the program # Extract the live data from the program
live_data = program.get("live", program) live_data = program.get("live", program)
title = live_data.get("title", "Untitled") title = live_data.get("title", "Untitled")
start_time = datetime.datetime.fromtimestamp(live_data.get("start", 0)) start_time = datetime.datetime.fromtimestamp(live_data.get("start", 0), tz=FRANCE_TZ).replace(tzinfo=None)
end_time = datetime.datetime.fromtimestamp(live_data.get("end", 0)) end_time = datetime.datetime.fromtimestamp(live_data.get("end", 0), tz=FRANCE_TZ).replace(tzinfo=None)
duration_min = (end_time - start_time).total_seconds() / 60 duration_min = (end_time - start_time).total_seconds() / 60
choice_name = ( choice_name = (
@@ -586,8 +587,8 @@ def select_program_from_epg(programs, original_start_date, original_end_date):
# Extract live data and convert program timestamps to datetime objects # Extract live data and convert program timestamps to datetime objects
live_data = selected_program.get("live", selected_program) live_data = selected_program.get("live", selected_program)
program_start = datetime.datetime.fromtimestamp(live_data.get("start", 0)) program_start = datetime.datetime.fromtimestamp(live_data.get("start", 0), tz=FRANCE_TZ).replace(tzinfo=None)
program_end = datetime.datetime.fromtimestamp(live_data.get("end", 0)) program_end = datetime.datetime.fromtimestamp(live_data.get("end", 0), tz=FRANCE_TZ).replace(tzinfo=None)
program_title = live_data.get("title", "Untitled") program_title = live_data.get("title", "Untitled")
logger.info("Selected program:") logger.info("Selected program:")

View File

@@ -12,6 +12,7 @@ from utils.stream import fetch_segment
from utils.logging_config import logger from utils.logging_config import logger
FRANCE_TZ = ZoneInfo("Europe/Paris") FRANCE_TZ = ZoneInfo("Europe/Paris")
TIMESCALE = 90000
def convert_ticks_to_sec(ticks, timescale): def convert_ticks_to_sec(ticks, timescale):
@@ -59,7 +60,7 @@ async def bruteforce(track_id, date, batch_size=20000):
valid_ticks = [] valid_ticks = []
total_requests = 288000 total_requests = 288000
logger.debug("Starting bruteforce for %s near %s", track_id, date) logger.debug("Starting bruteforce for %s near (%s) %s", track_id, date, convert_sec_to_date(convert_ticks_to_sec(date, TIMESCALE)))
start_time = time.time() start_time = time.time()

19
uv.lock generated
View File

@@ -790,6 +790,7 @@ dependencies = [
{ name = "requests" }, { name = "requests" },
{ name = "tabulate" }, { name = "tabulate" },
{ name = "tqdm" }, { name = "tqdm" },
{ name = "tzdata" },
] ]
[package.dev-dependencies] [package.dev-dependencies]
@@ -807,7 +808,8 @@ requires-dist = [
{ name = "pywidevine", specifier = ">=1.9.0" }, { name = "pywidevine", specifier = ">=1.9.0" },
{ name = "requests", specifier = ">=2.32.5" }, { name = "requests", specifier = ">=2.32.5" },
{ name = "tabulate", specifier = ">=0.9.0" }, { name = "tabulate", specifier = ">=0.9.0" },
{ name = "tqdm", specifier = ">=4.68.2" }, { name = "tqdm", specifier = ">=4.68.3" },
{ name = "tzdata", specifier = ">=2026.2" },
] ]
[package.metadata.requires-dev] [package.metadata.requires-dev]
@@ -1299,14 +1301,14 @@ wheels = [
[[package]] [[package]]
name = "tqdm" name = "tqdm"
version = "4.68.2" version = "4.68.3"
source = { registry = "https://pypi.org/simple" } source = { registry = "https://pypi.org/simple" }
dependencies = [ dependencies = [
{ name = "colorama", marker = "sys_platform == 'win32'" }, { name = "colorama", marker = "sys_platform == 'win32'" },
] ]
sdist = { url = "https://files.pythonhosted.org/packages/85/05/0d5260f1f1ca784f4a4a0def9cbe6affe587f5b4025328d446c3d67765f4/tqdm-4.68.2.tar.gz", hash = "sha256:89c230e8dbc67c7615c142487111222f878c77427ea09549960f62389e258add", size = 171923, upload-time = "2026-06-09T13:26:42.539Z" } sdist = { url = "https://files.pythonhosted.org/packages/87/d7/0535a28b1f5f24f6612fb3ff1e89fb1a8d160fee0f976e0aa6803862134b/tqdm-4.68.3.tar.gz", hash = "sha256:00dfa48452b6b6cfae3dd9885636c23d3422d1ec97c66d96818cbd5e0821d482", size = 170596, upload-time = "2026-06-17T07:36:52.105Z" }
wheels = [ wheels = [
{ url = "https://files.pythonhosted.org/packages/eb/75/1a0392bcc21c44dcdf87b3cf2d137e7829be2c083a1e38d44efca3d57a16/tqdm-4.68.2-py3-none-any.whl", hash = "sha256:d4240441fb5353290b87d6a85968c9decc131a99b8c7faa28269d829de669ede", size = 78578, upload-time = "2026-06-09T13:26:40.731Z" }, { url = "https://files.pythonhosted.org/packages/d8/8e/bb97bb0c71802080bfc8952937d174e49cfc50de5c951dd47b2496f0dcdb/tqdm-4.68.3-py3-none-any.whl", hash = "sha256:39832cc2def2789a6f29df83f172db7416cea70052c0907a57801c5f2fdccb03", size = 78337, upload-time = "2026-06-17T07:36:50.132Z" },
] ]
[[package]] [[package]]
@@ -1318,6 +1320,15 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" }, { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" },
] ]
[[package]]
name = "tzdata"
version = "2026.2"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/ba/19/1b9b0e29f30c6d35cb345486df41110984ea67ae69dddbc0e8a100999493/tzdata-2026.2.tar.gz", hash = "sha256:9173fde7d80d9018e02a662e168e5a2d04f87c41ea174b139fbef642eda62d10", size = 198254, upload-time = "2026-04-24T15:22:08.651Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/ce/e4/dccd7f47c4b64213ac01ef921a1337ee6e30e8c6466046018326977efd95/tzdata-2026.2-py2.py3-none-any.whl", hash = "sha256:bbe9af844f658da81a5f95019480da3a89415801f6cc966806612cc7169bffe7", size = 349321, upload-time = "2026-04-24T15:22:05.876Z" },
]
[[package]] [[package]]
name = "unidecode" name = "unidecode"
version = "1.4.0" version = "1.4.0"