Webscraper and parser for clearoutside.com
Project description
ClearOutsideAPY
Webscraper/API for ClearOutside.com
Python module for scraping and parsing data from clearoutside.com
Created using BeautifulSoup4, requests and html5lib.
Installation
From PyPI:
pip install clear-outside-apy
From repo:
pip install git+https://github.com/TheElevatedOne/ClearOutsideAPY.git
Usage
from clear_outside_apy import ClearOutsideAPY
api = ClearOutsideAPY(lat: str, long: str, view: str = "midday")
api.update()
result = api.pull()
-
lat-> latitude with two decimal places -
long-> longitude with two decimal places- ex.
lat = "43.16", long = "-75.84"-> New York
- ex.
-
view-> string in three formats:midday-> start at 12pm/12:00midnight-> start at 12am/24:00current-> start at current time
-
__init__-> initializes the class, scrapes the website for the first time -
update()-> scrapes the website -
pull()-> parses and pulls the data; returns a giant dictionary
Output Preview
Units
This Module outputs everything in Metric Units and European/Military time (24h)
- Date format: dd/MM/yy,
- Sky Quality:
- Brightness - millicandela per meter squared,
- Artificial Brightness - candela per meter squared,
- Distance/Visibility: kilometers; (if showing 0.0, data is missing from the website),
- Rain: millimeters,
- Speed: kilometers per hour
- Temperature: degrees Celsius
- Pressure: millibars
- Ozone: Dobson Unit (du)
Result
Showing a piece of resulting dictionary in json format.
The entire dictionary is around 4000 lines long in json format as it shows 17 types of information per hour in a day for 24 hours and 7 days.
If you want to see the entire file for some unknown reason, go here example/example-result.json.
{
"gen-info": {
"last-gen": {
"date": "19/02/25",
"time": "20:26:52"
},
"forecast": {
"from-day": "19/02/25",
"to-day": "25/02/25"
},
"timezone": "UTC-5.00"
},
"sky-quality": {
"magnitude": "21.3",
"bortle_class": "4",
"brightness": [
"0.33",
"mcd/m2"
],
"artif-brightness": [
"155.5",
"cd/m2"
]
},
"forecast": {
"day-0": {
"date": {
"long": "Wednesday",
"short": "19"
},
"sun": {
"rise": "06:51",
"set": "17:40",
"transit": "12:17",
"civil-dark": [
"18:09",
"06:22"
],
"nautical-dark": [
"18:42",
"05:49"
],
"astro-dark": [
"19:15",
"05:16"
]
},
"moon": {
"rise": "01:12",
"set": "10:07",
"phase": {
"name": "Waning Gibbous",
"percentage": "53%"
}
},
"hours": {
"12": {
"conditions": "bad",
"total-clouds": "91",
"low-clouds": "90",
"mid-clouds": "13",
"high-clouds": "18",
"visibility": "0.0",
"fog": "0",
"prec-type": "none",
"prec-probability": "0",
"prec-amount": "0",
"wind": {
"speed": "17.7",
"direction": "north-west"
},
"frost": "frost",
"temperature": {
"general": "-9",
"feels-like": "-14",
"dew-point": "-13"
},
"rel-humidity": "74",
"pressure": "1028",
"ozone": "375"
},
"13": {"..."},
"..."
}
},
"day-1": {"..."},
"..."
}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clear_outside_apy-1.0.1.tar.gz.
File metadata
- Download URL: clear_outside_apy-1.0.1.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8db68b38295a998370af307dad344a29097c7b1eda375d608c338f57cc7da503
|
|
| MD5 |
80808c9ec558b9b2da842f56bf9eddcb
|
|
| BLAKE2b-256 |
004822fef3dcd9a90fa0c882be459e7374ee0677aa69d36b0f06ee66aec21413
|
File details
Details for the file clear_outside_apy-1.0.1-py3-none-any.whl.
File metadata
- Download URL: clear_outside_apy-1.0.1-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7da158892b36eb49b4fa87bf72ab5f72fb7fae53e1881fd92500c94b9882f4e5
|
|
| MD5 |
6cd6ae1db859cb8c2494b85060c2349d
|
|
| BLAKE2b-256 |
ebdcfd2ae3cdbe3dee6b72530fd93149e064417decd7f71a4abee871b27416e9
|