From 7d40562e58b99831f2638f08298838ce99c2956d Mon Sep 17 00:00:00 2001 From: Nicolas Dagoneau Date: Sun, 31 Dec 2023 09:46:24 +0100 Subject: [PATCH] Update celestrak urls --- pyorbital/tlefile.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pyorbital/tlefile.py b/pyorbital/tlefile.py index 2b52b02b..9b814129 100644 --- a/pyorbital/tlefile.py +++ b/pyorbital/tlefile.py @@ -37,16 +37,18 @@ from xml.etree import ElementTree as ET from itertools import zip_longest - -TLE_URLS = ('https://celestrak.org/NORAD/elements/active.txt', - 'https://celestrak.org/NORAD/elements/weather.txt', - 'https://celestrak.org/NORAD/elements/resource.txt', - 'https://celestrak.org/NORAD/elements/cubesat.txt', - 'https://celestrak.org/NORAD/elements/stations.txt', - 'https://celestrak.org/NORAD/elements/sarsat.txt', - 'https://celestrak.org/NORAD/elements/noaa.txt', - 'https://celestrak.org/NORAD/elements/amateur.txt', - 'https://celestrak.org/NORAD/elements/engineering.txt') +TLE_GROUPS = ('active', + 'weather', + 'resource', + 'cubesat', + 'stations', + 'sarsat', + 'noaa', + 'amateur', + 'engineering') + +TLE_URLS = [f'https://celestrak.org/NORAD/elements/gp.php?GROUP={group}&FORMAT=tle' + for group in TLE_GROUPS] LOGGER = logging.getLogger(__name__)