Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#!/usr/bin/python3 import requests import json from os.path import exists from datetime import datetime, timedelta import time current_time = time.strftime("%Y-%m-%dT%H:%M:%S") date = datetime.strptime(current_time, "%Y-%m-%dT%H:%M:%S") now = date.isoformat() url = "https://monitoring.paa.gov.pl/geoserver/ows" querystring = {"service":"WFS", "version":"2.0.0", "request":"GetFeature", "typeNames":"paa:kcad_siec_pms_moc_dawki_mapa", "outputFormat":"application/json", "viewparams":f"date_from:2023-01-01T17:25:18.000Z;date_to:{now}"} headers = {"Content-Type": "application/json"} response = requests.request("GET", url, headers=headers, params=querystring) response_json = response.json() json_object = json.dumps(response_json) with open("/share/htdocs/radiation_test.json", "w") as outfile: outfile.write(json_object)
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)