Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/passpredict/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def _query_tle_from_celestrak(self, satid: int = None):
"""
Download current TLEs from Celestrak and save them to a JSON file
"""
url = 'https://celestrak.com/NORAD/elements/gp.php'
url = 'https://celestrak.org/NORAD/elements/gp.php'
params = {
'CATNR': satid,
'FORMAT': 'TLE',
Expand All @@ -137,7 +137,7 @@ def _query_tle_category_from_celestrak(self, category: str) -> List[TLE]:
Enter Celestrak category string.
Eg. visual, stations, tle-new, weather, noaa, oneweb, starlink
"""
url = f'https://celestrak.com/NORAD/elements/{category}.txt'
url = f'https://celestrak.org/NORAD/elements/{category}.txt'
r = httpx.get(url)
if not r.text or r.status_code >= 300:
raise CelestrakError(f'Celestrak TLEs for {category}.txt not found')
Expand Down Expand Up @@ -180,4 +180,4 @@ def parse_tle(tle_lines):
raise Exception(f"Invalid TLE strings {tle_lines}")
satid = int(tle1[2:7])
tle = TLE(satid, (tle1, tle2), name=name)
return tle
return tle