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 # pylenie.py import requests import json url = "https://data.twojapogoda.pl/forecasts/themed/allergies/daily/2333/1" r = requests.get(url) text_json = json.loads(r.text) allergens = text_json["forecasts"][0]["allergens"] lista = ["Trawy", "Bylica", "Brzoza", "Alternaria", "Olsza", "Dąb", "Komosa", "Cladosporium", "Babka", "Szczaw", "Pokrzywa", "Leszczyna", "Wierzba", "Topola"] allerg_dict = {lista[i]:allergens[i] for i in range(len(lista))} json_object = json.dumps(allerg_dict,ensure_ascii=False) with open("pylenie.json","w" ) as f: f.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)