Jack Sweeney
2 years ago
committed by
GitHub
25 changed files with 1278 additions and 694 deletions
@ -1,23 +1,37 @@ |
|||||||
FROM python:3 |
FROM python:3 |
||||||
|
|
||||||
WORKDIR /plane-notify |
WORKDIR /plane-notify |
||||||
|
USER root |
||||||
|
|
||||||
COPY . . |
COPY . . |
||||||
|
|
||||||
# Set the Chrome repo. |
RUN set -ex && \ |
||||||
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ |
apt-get update -qq && \ |
||||||
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list |
apt-get -y -qq install --no-install-recommends \ |
||||||
|
ca-certificates \ |
||||||
# Install Chrome. |
gnupg && \ |
||||||
RUN apt-get update && apt-get -y install google-chrome-stable |
curl -sSL https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ |
||||||
|
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list && \ |
||||||
# Add pipenv |
apt-get -y -qq update \ |
||||||
RUN pip install pipenv==2021.5.29 |
&& apt-get -y -qq install --no-install-recommends \ |
||||||
|
bash \ |
||||||
# Install dependencies |
curl \ |
||||||
RUN pipenv install |
google-chrome-stable \ |
||||||
|
python3 \ |
||||||
|
python3-dev \ |
||||||
|
python3-pip \ |
||||||
|
python3-setuptools \ |
||||||
|
python3-wheel \ |
||||||
|
&& rm -rf \ |
||||||
|
/var/lib/apt/lists/* \ |
||||||
|
/var/cache/apt/archives |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
RUN pip3 install --upgrade pip && \ |
||||||
|
pip3 install -U --no-cache-dir -r ./requirements.txt |
||||||
|
|
||||||
# Added needed folder for plane-notify process |
# Added needed folder for plane-notify process |
||||||
RUN mkdir /home/plane-notify |
RUN mkdir -p /home/plane-notify |
||||||
|
|
||||||
CMD pipenv run python /plane-notify/__main__.py |
CMD python3 /plane-notify/__main__.py |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 224 KiB |
Before Width: | Height: | Size: 35 KiB |
@ -1,214 +1,412 @@ |
|||||||
{ |
{ |
||||||
"EA50": { |
"EA50": { |
||||||
"name": "Eclipse 550", |
"name": "Eclipse 550", |
||||||
"galph": 76, |
"galph": 76, |
||||||
"category": "VLJ" |
"category": "VLJ" |
||||||
}, |
}, |
||||||
"LJ31": { |
"LJ31": { |
||||||
"name": "Learjet 31", |
"name": "Learjet 31", |
||||||
"galph": 202, |
"galph": 202, |
||||||
"category": "Light" |
"category": "Light" |
||||||
}, |
}, |
||||||
"LJ40": { |
"LJ40": { |
||||||
"name": "Learjet 40", |
"name": "Learjet 40", |
||||||
"galph": 207, |
"galph": 207, |
||||||
"category": "Light" |
"category": "Light" |
||||||
}, |
}, |
||||||
"PC24": { |
"PC24": { |
||||||
"name": "Pilatus PC-24", |
"name": "Pilatus PC-24", |
||||||
"galph": 154, |
"galph": 154, |
||||||
"category": "Light" |
"category": "Light" |
||||||
}, |
}, |
||||||
"LJ45": { |
"LJ45": { |
||||||
"name": "Learjet 45", |
"name": "Learjet 45", |
||||||
"galph": 205, |
"galph": 205, |
||||||
"category": "Super Light" |
"category": "Super Light" |
||||||
}, |
}, |
||||||
"LJ70": { |
"LJ70": { |
||||||
"name": "Learjet 70", |
"name": "Learjet 70", |
||||||
"galph": 198, |
"galph": 198, |
||||||
"category": "Super Light" |
"category": "Super Light" |
||||||
}, |
}, |
||||||
"LJ75": { |
"LJ75": { |
||||||
"name": "Learjet 75", |
"name": "Learjet 75", |
||||||
"galph": 199, |
"galph": 199, |
||||||
"category": "Super Light" |
"category": "Super Light" |
||||||
}, |
}, |
||||||
"G150": { |
"G150": { |
||||||
"name": "Gulfstream G150", |
"name": "Gulfstream G150", |
||||||
"galph": 228, |
"galph": 228, |
||||||
"category": "Midsize" |
"category": "Midsize" |
||||||
}, |
}, |
||||||
"LJ60": { |
"LJ60": { |
||||||
"name": "Learjet 60", |
"name": "Learjet 60", |
||||||
"galph": 239, |
"galph": 239, |
||||||
"category": "Midsize" |
"category": "Midsize" |
||||||
}, |
}, |
||||||
"GALX": { |
"GALX": { |
||||||
"name": "Gulfstream G200", |
"name": "Gulfstream G200", |
||||||
"galph": 278, |
"galph": 278, |
||||||
"category": "Super Midsize" |
"category": "Super Midsize" |
||||||
}, |
}, |
||||||
"G280": { |
"G280": { |
||||||
"name": "Gulfstream G280", |
"name": "Gulfstream G280", |
||||||
"galph": 297, |
"galph": 297, |
||||||
"category": "Super Midsize" |
"category": "Super Midsize" |
||||||
}, |
}, |
||||||
"GLF5": { |
"GLF5": { |
||||||
"name": "Gulfstream G500", |
"name": "Gulfstream G500", |
||||||
"galph": 447, |
"galph": 447, |
||||||
"category": "Large" |
"category": "Large" |
||||||
}, |
}, |
||||||
"GLF6": { |
"GLF6": { |
||||||
"name": "Gulfstream G650", |
"name": "Gulfstream G650", |
||||||
"galph": 503, |
"galph": 503, |
||||||
"category": "Ultra Long Range" |
"category": "Ultra Long Range" |
||||||
}, |
}, |
||||||
"PC12": { |
"PC12": { |
||||||
"name": "Pilatus PC-12", |
"name": "Pilatus PC-12", |
||||||
"galph": 66, |
"galph": 66, |
||||||
"category": "Turboprop Aircraft" |
"category": "Turboprop Aircraft" |
||||||
}, |
}, |
||||||
"GLEX": { |
"GLEX": { |
||||||
"name": "Global", |
"name": "Global", |
||||||
"galph": 500, |
"galph": 500, |
||||||
"category": "Ultra Long Range" |
"category": "Ultra Long Range" |
||||||
} |
}, |
||||||
, |
|
||||||
"CL30": { |
"CL30": { |
||||||
"name": "Challenger 300", |
"name": "Challenger 300", |
||||||
"galph": 295, |
"galph": 295, |
||||||
"category": "Super Midsize" |
"category": "Super Midsize" |
||||||
}, "B742": { |
}, |
||||||
"name": "Boeing 747-200", |
"B742": { |
||||||
"galph": 3830, |
"name": "Boeing 747-200", |
||||||
"category": "Large" |
"galph": 3830, |
||||||
}, "T38": { |
"category": "Large" |
||||||
"name": "T-38 Talon", |
}, |
||||||
"galph": 375, |
"T38": { |
||||||
"category": "Fighter" |
"name": "T-38 Talon", |
||||||
}, "WB57": { |
"galph": 375, |
||||||
"name": "Martin B-57 Canberra", |
"category": "Fighter" |
||||||
"galph": 531, |
}, |
||||||
"category": "Twinjet Tactical Bomber and Reconnaissance" |
"WB57": { |
||||||
}, "B74S": { |
"name": "Martin B-57 Canberra", |
||||||
"name": "747 SP", |
"galph": 531, |
||||||
"galph": 2289, |
"category": "Twinjet Tactical Bomber and Reconnaissance" |
||||||
"category": "Large" |
}, |
||||||
}, "B752": { |
"B74S": { |
||||||
"name": "757 200", |
"name": "747 SP", |
||||||
"galph": 877, |
"galph": 2289, |
||||||
"category": "Large" |
"category": "Large" |
||||||
}, |
}, |
||||||
"B738": { |
"B752": { |
||||||
"name": "737 800", |
"name": "757 200", |
||||||
"galph": 832, |
"galph": 877, |
||||||
"category": "Medium" |
"category": "Large" |
||||||
|
}, |
||||||
|
"B738": { |
||||||
|
"name": "737 800", |
||||||
|
"galph": 832, |
||||||
|
"category": "Medium" |
||||||
}, |
}, |
||||||
"B737": { |
"B737": { |
||||||
"name": "737 700", |
"name": "737 700", |
||||||
"galph": 796, |
"galph": 796, |
||||||
"category": "Medium" |
"category": "Medium" |
||||||
}, |
}, |
||||||
"A320": { |
"A320": { |
||||||
"name": "A320", |
"name": "A320", |
||||||
"galph": 800, |
"galph": 800, |
||||||
"category": "Medium" |
"category": "Medium" |
||||||
}, |
}, |
||||||
"P3": { |
"P3": { |
||||||
"name": "Lockheed Orion P3", |
"name": "Lockheed Orion P3", |
||||||
"galph": 671, |
"galph": 671, |
||||||
"category": "Turboprop" |
"category": "Turboprop" |
||||||
}, |
}, |
||||||
"C750": { |
"C750": { |
||||||
"name": "Cessna 750 Citation X", |
"name": "Cessna 750 Citation X", |
||||||
"galph": 347, |
"galph": 347, |
||||||
"category": "Small Private Jet" |
"category": "Small Private Jet" |
||||||
}, |
}, |
||||||
"FA7X": { |
"FA7X": { |
||||||
"name": "Dassult Falcon 7X", |
"name": "Dassult Falcon 7X", |
||||||
"galph": 380, |
"galph": 380, |
||||||
"category": "Small Private Jet" |
"category": "Small Private Jet" |
||||||
}, |
}, |
||||||
"F900": { |
"F900": { |
||||||
"name": "Dassult Falcon 900", |
"name": "Dassult Falcon 900", |
||||||
"galph": 347, |
"galph": 347, |
||||||
"category": "Small Private Jet" |
"category": "Small Private Jet" |
||||||
}, |
}, |
||||||
"H25B": { |
"H25B": { |
||||||
"name": "Hawker 750/850", |
"name": "Hawker 750/850", |
||||||
"galph": 270, |
"galph": 270, |
||||||
"category": "Small Private Jet" |
"category": "Small Private Jet" |
||||||
}, |
}, |
||||||
"C680": { |
"C680": { |
||||||
"name": "Cessna 680 Citation", |
"name": "Cessna 680 Citation", |
||||||
"galph": 247, |
"galph": 247, |
||||||
"category": "Small Private Jet" |
"category": "Small Private Jet" |
||||||
}, |
}, |
||||||
"GLF3": { |
"GLF3": { |
||||||
"name": "Gulfstream 3", |
"name": "Gulfstream 3", |
||||||
"galph": 568, |
"galph": 568, |
||||||
"category": "Heavy Private Jet" |
"category": "Heavy Private Jet" |
||||||
}, |
}, |
||||||
"GLF4": { |
"GLF4": { |
||||||
"name": "Gulfstream 4", |
"name": "Gulfstream 4", |
||||||
"galph": 479, |
"galph": 479, |
||||||
"category": "Heavy Private Jet" |
"category": "Heavy Private Jet" |
||||||
}, |
}, |
||||||
"CL60": { |
"CL60": { |
||||||
"name": "Bombardier CL-600 Challenge", |
"name": "Bombardier CL-600 Challenge", |
||||||
"galph": 262, |
"galph": 262, |
||||||
"category": "Mid-size Private Jet" |
"category": "Mid-size Private Jet" |
||||||
}, |
}, |
||||||
"A139": { |
"A139": { |
||||||
"name": "Agusta-Bell AW139", |
"name": "Agusta-Bell AW139", |
||||||
"galph": 150, |
"galph": 150, |
||||||
"category": "Medium Utility Helicopter" |
"category": "Medium Utility Helicopter" |
||||||
}, |
}, |
||||||
"GL5T": { |
"GL5T": { |
||||||
"name": "Global 5000", |
"name": "Global 5000", |
||||||
"galph": 455, |
"galph": 455, |
||||||
"category": "Heavy Private Jet" |
"category": "Heavy Private Jet" |
||||||
}, |
}, |
||||||
"GA6C": { |
"GA6C": { |
||||||
"name": "Gulfstream G600", |
"name": "Gulfstream G600", |
||||||
"galph": 458, |
"galph": 458, |
||||||
"category": "Heavy Private Jet" |
"category": "Heavy Private Jet" |
||||||
}, |
}, |
||||||
"A337": { |
"A337": { |
||||||
"name": "Airbus Beluga XL", |
"name": "Airbus Beluga XL", |
||||||
"galph": 1800, |
"galph": 1800, |
||||||
"category": "Large Transport Aircraft" |
"category": "Large Transport Aircraft" |
||||||
}, |
}, |
||||||
"A3ST": { |
"A3ST": { |
||||||
"name": "Airbus Beluga", |
"name": "Airbus Beluga", |
||||||
"galph": 1260, |
"galph": 1260, |
||||||
"category": "Large Transport Aircraft" |
"category": "Large Transport Aircraft" |
||||||
}, |
}, |
||||||
"F2TH": { |
"F2TH": { |
||||||
"name": "Dassault Falcon 2000", |
"name": "Dassault Falcon 2000", |
||||||
"galph": 245, |
"galph": 245, |
||||||
"category": "Medium Private Jet" |
"category": "Medium Private Jet" |
||||||
}, |
}, |
||||||
"GA5C": { |
"GA5C": { |
||||||
"name": "Gulfstream G500", |
"name": "Gulfstream G500", |
||||||
"galph": 402, |
"galph": 402, |
||||||
"category": "Large Private Jet" |
"category": "Large Private Jet" |
||||||
}, |
}, |
||||||
"C130": { |
"C130": { |
||||||
"name": "Lockheed C130", |
"name": "Lockheed C130", |
||||||
"galph": 740, |
"galph": 740, |
||||||
"category": "Medium Cargo" |
"category": "Medium Cargo" |
||||||
}, |
}, |
||||||
"B762": { |
"B762": { |
||||||
"name": "Boeing 767 200", |
"name": "Boeing 767 200", |
||||||
"galph": 1722, |
"galph": 1722, |
||||||
"category": "Wide-body" |
"category": "Wide-body" |
||||||
}, |
}, |
||||||
"B772": { |
"B772": { |
||||||
"name": "Boeing 777 200", |
"name": "Boeing 777 200", |
||||||
"galph": 2300, |
"galph": 2300, |
||||||
"category": "Wide-body" |
"category": "Wide-body" |
||||||
|
}, |
||||||
|
"SLCH": { |
||||||
|
"name": "Stratolaunch", |
||||||
|
"galph": 2396, |
||||||
|
"category": "Special" |
||||||
|
}, |
||||||
|
"P51": { |
||||||
|
"name": "P51 Mustang", |
||||||
|
"galph": 65, |
||||||
|
"category": "Fighter" |
||||||
|
}, |
||||||
|
"HDJT": { |
||||||
|
"name": "Honda Jet", |
||||||
|
"galph": 90, |
||||||
|
"category": "Light Jet" |
||||||
|
}, |
||||||
|
"B744": { |
||||||
|
"name": "Boeing 747-400", |
||||||
|
"galph": 3700, |
||||||
|
"category": "Heavy Airliner" |
||||||
|
}, |
||||||
|
"E190": { |
||||||
|
"name": "Embrar E190", |
||||||
|
"galph": 469, |
||||||
|
"category": "Heavy Jet" |
||||||
|
}, |
||||||
|
"FA50": { |
||||||
|
"name": "Falcon 50", |
||||||
|
"galph": 229, |
||||||
|
"category": "Heavy Jet" |
||||||
|
}, |
||||||
|
"GL7T": { |
||||||
|
"name": "Global 7000", |
||||||
|
"galph": 460, |
||||||
|
"category": "Heavy Jet" |
||||||
|
}, |
||||||
|
"GL6T": { |
||||||
|
"name": "", |
||||||
|
"galph": 455.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"C68A": { |
||||||
|
"name": "", |
||||||
|
"galph": 212.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"C56X": { |
||||||
|
"name": "", |
||||||
|
"galph": 217.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"B763": { |
||||||
|
"name": "", |
||||||
|
"galph": 1320.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"A310": { |
||||||
|
"name": "", |
||||||
|
"galph": 1189.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"A330": { |
||||||
|
"name": "", |
||||||
|
"galph": 1505.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"A380": { |
||||||
|
"name": "", |
||||||
|
"galph": 4062.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"E170": { |
||||||
|
"name": "", |
||||||
|
"galph": 469.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"DC87": { |
||||||
|
"name": "", |
||||||
|
"galph": 1250.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"SGUP": { |
||||||
|
"name": "", |
||||||
|
"galph": 1156.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"WHK2": { |
||||||
|
"name": "", |
||||||
|
"galph": 500.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"B350": { |
||||||
|
"name": "", |
||||||
|
"galph": 122.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"BE30": { |
||||||
|
"name": "", |
||||||
|
"galph": 121.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"FA8X": { |
||||||
|
"name": "", |
||||||
|
"galph": 380.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"E550": { |
||||||
|
"name": "", |
||||||
|
"galph": 280.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"E55P": { |
||||||
|
"name": "", |
||||||
|
"galph": 166.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"A332": { |
||||||
|
"name": "", |
||||||
|
"galph": 1480, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"GA7C": { |
||||||
|
"name": "", |
||||||
|
"galph": 382.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"FA6X": { |
||||||
|
"name": "", |
||||||
|
"galph": 419.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"B3XM": { |
||||||
|
"name": "", |
||||||
|
"galph": 716.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"B779": { |
||||||
|
"name": "", |
||||||
|
"galph": 2250.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"BE22": { |
||||||
|
"name": "", |
||||||
|
"galph": 60.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"C560": { |
||||||
|
"name": "", |
||||||
|
"galph": 182.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"E145": { |
||||||
|
"name": "", |
||||||
|
"galph": 284.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"C25C": { |
||||||
|
"name": "", |
||||||
|
"galph": 110.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"C25B": { |
||||||
|
"name": "", |
||||||
|
"galph": 110.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"C441": { |
||||||
|
"name": "", |
||||||
|
"galph": 57.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"E50P": { |
||||||
|
"name": "", |
||||||
|
"galph": 109.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"CRJ2": { |
||||||
|
"name": "", |
||||||
|
"galph": 325.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"CRJ7": { |
||||||
|
"name": "", |
||||||
|
"galph": 444.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"BE40": { |
||||||
|
"name": "", |
||||||
|
"galph": 220.0, |
||||||
|
"category": "" |
||||||
|
}, |
||||||
|
"C700": { |
||||||
|
"name": "", |
||||||
|
"galph": 288.0, |
||||||
|
"category": "" |
||||||
} |
} |
||||||
|
|
||||||
} |
} |
@ -0,0 +1,39 @@ |
|||||||
|
def sendMastodon(photo, message, config): |
||||||
|
from mastodon import Mastodon |
||||||
|
sent = False |
||||||
|
retry_c = 0 |
||||||
|
while sent == False: |
||||||
|
try: |
||||||
|
bot = Mastodon( |
||||||
|
access_token=config.get('MASTODON','ACCESS_TOKEN'), |
||||||
|
api_base_url=config.get('MASTODON','APP_URL') |
||||||
|
) |
||||||
|
mediaid = bot.media_post(photo, mime_type="image/jpeg") |
||||||
|
sent = bot.status_post(message,None,mediaid,False, "Public") |
||||||
|
except Exception as err: |
||||||
|
print('err.args:') |
||||||
|
print(err.args) |
||||||
|
print(f"Unexpected {err=}, {type(err)=}") |
||||||
|
print("\nString err:\n"+str(err)) |
||||||
|
if retry_c > 4: |
||||||
|
print('Mastodon attempts exceeded. Message not sent.') |
||||||
|
break |
||||||
|
elif str(err) == 'Unauthorized': |
||||||
|
print('Invalid Mastodon bot token, message not sent.') |
||||||
|
break |
||||||
|
elif str(err) == 'Timed out': |
||||||
|
retry_c += 1 |
||||||
|
print('Mastodon timeout count: '+str(retry_c)) |
||||||
|
pass |
||||||
|
elif str(err)[:35] == '[Errno 2] No such file or directory': |
||||||
|
print('Mastodon module couldn\'t find an image to send.') |
||||||
|
break |
||||||
|
elif str(err) == 'Media_caption_too_long': |
||||||
|
print('Mastodon image caption lenght exceeds 1024 characters. Message not send.') |
||||||
|
break |
||||||
|
else: |
||||||
|
print('[X] Unknown error. Message not sent.') |
||||||
|
break |
||||||
|
else: |
||||||
|
print("Mastodon message successfully sent.") |
||||||
|
return sent |
@ -0,0 +1,34 @@ |
|||||||
|
import requests |
||||||
|
import configparser |
||||||
|
from datetime import datetime |
||||||
|
|
||||||
|
main_config = configparser.ConfigParser() |
||||||
|
main_config.read('./configs/mainconf.ini') |
||||||
|
api_version = main_config.get('RpdADSBX', 'API_VERSION') |
||||||
|
|
||||||
|
def pull_rpdadsbx(planes): |
||||||
|
api_version = int(main_config.get('RpdADSBX', 'API_VERSION')) |
||||||
|
if api_version != 2: |
||||||
|
raise ValueError("Bad RapidAPI ADSBX API Version") |
||||||
|
url = "https://adsbexchange-com1.p.rapidapi.com/v2/icao/" + planes + "/" |
||||||
|
headers = { |
||||||
|
"X-RapidAPI-Host": "adsbexchange-com1.p.rapidapi.com", |
||||||
|
"X-RapidAPI-Key": main_config.get('RpdADSBX', 'API_KEY') |
||||||
|
} |
||||||
|
try: |
||||||
|
response = requests.get(url, headers = headers, timeout=30) |
||||||
|
response.raise_for_status() |
||||||
|
data = response.json() |
||||||
|
if "msg" in data.keys() and data['msg'] != "No error": |
||||||
|
raise ValueError("Error from ADSBX: msg = ", data['msg']) |
||||||
|
if "ctime" in data.keys(): |
||||||
|
data_ctime = float(data['ctime']) / 1000.0 |
||||||
|
print("Data ctime:",datetime.utcfromtimestamp(data_ctime)) |
||||||
|
if "now" in data.keys(): |
||||||
|
data_now = float(data['now']) / 1000.0 |
||||||
|
print("Data now time:",datetime.utcfromtimestamp(data_now)) |
||||||
|
print("Current UTC:", datetime.utcnow()) |
||||||
|
return data |
||||||
|
except Exception as e: |
||||||
|
print('Error calling RapidAPI', e) |
||||||
|
return None |
@ -0,0 +1,22 @@ |
|||||||
|
# requirements.txt |
||||||
|
colorama |
||||||
|
geopy |
||||||
|
tabulate |
||||||
|
pytz |
||||||
|
pillow |
||||||
|
tweepy |
||||||
|
discord-webhook |
||||||
|
selenium |
||||||
|
git+https://github.com/openskynetwork/opensky-api.git@master#subdirectory=python/ |
||||||
|
webdriver-manager |
||||||
|
shapely |
||||||
|
pandas |
||||||
|
python-telegram-bot |
||||||
|
mastodon.py |
||||||
|
beautifulsoup4 |
||||||
|
pycairo |
||||||
|
py-staticmaps |
||||||
|
pyproj |
||||||
|
lxml |
||||||
|
configparser |
||||||
|
geog |
Loading…
Reference in new issue