Compare commits

..

11 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
6 changed files with 26 additions and 12 deletions

View File

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

View File

@@ -18,6 +18,7 @@ dependencies = [
"requests>=2.32.5",
"tabulate>=0.9.0",
"tqdm>=4.68.3",
"tzdata>=2026.2",
]
[project.scripts]

View File

@@ -1,7 +1,7 @@
aiohttp==3.13.5
aiohttp==3.14.1
InquirerPy==0.3.4
python-dotenv==1.2.1
python-dotenv==1.2.2
pywidevine==1.9.0
Requests==2.32.5
tabulate==0.9.0
Requests==2.34.2
tabulate==0.10.0
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.logging_config import logger
from utils.times import FRANCE_TZ
SERVICE_PLAN_API_URL = "https://api.oqee.net/api/v6/service_plan"
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:
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)
try:
@@ -533,8 +534,8 @@ def select_program_from_epg(programs, original_start_date, original_end_date):
# Extract the live data from the program
live_data = program.get("live", program)
title = live_data.get("title", "Untitled")
start_time = datetime.datetime.fromtimestamp(live_data.get("start", 0))
end_time = datetime.datetime.fromtimestamp(live_data.get("end", 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), tz=FRANCE_TZ).replace(tzinfo=None)
duration_min = (end_time - start_time).total_seconds() / 60
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
live_data = selected_program.get("live", selected_program)
program_start = datetime.datetime.fromtimestamp(live_data.get("start", 0))
program_end = datetime.datetime.fromtimestamp(live_data.get("end", 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), tz=FRANCE_TZ).replace(tzinfo=None)
program_title = live_data.get("title", "Untitled")
logger.info("Selected program:")

View File

@@ -12,6 +12,7 @@ from utils.stream import fetch_segment
from utils.logging_config import logger
FRANCE_TZ = ZoneInfo("Europe/Paris")
TIMESCALE = 90000
def convert_ticks_to_sec(ticks, timescale):
@@ -59,7 +60,7 @@ async def bruteforce(track_id, date, batch_size=20000):
valid_ticks = []
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()

11
uv.lock generated
View File

@@ -790,6 +790,7 @@ dependencies = [
{ name = "requests" },
{ name = "tabulate" },
{ name = "tqdm" },
{ name = "tzdata" },
]
[package.dev-dependencies]
@@ -808,6 +809,7 @@ requires-dist = [
{ name = "requests", specifier = ">=2.32.5" },
{ name = "tabulate", specifier = ">=0.9.0" },
{ name = "tqdm", specifier = ">=4.68.3" },
{ name = "tzdata", specifier = ">=2026.2" },
]
[package.metadata.requires-dev]
@@ -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" },
]
[[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]]
name = "unidecode"
version = "1.4.0"