A simple web scraper for gismeteo.com
Project description
GisMeteoScraper
This is a python web scraper for gismeteo, it scrapes all html content from webpage.
Requirements
GisMeteoScraper uses libraries such as:
- requests
- bs4 (BeautifulSoup4)
GisMeteoScraper is also built on python 3.7.3
Usage example
from scraper import GisMeteoScraper
gis = GisMeteoScraper("link to gismeteo with town")
weather = gis.scrape_info()
Output
GisMeteoScraper's scrape_info()
outputs dict()
object, which contains weather on each timeslot as int()
(like 0, or 21), for example:
timeslot:
{'gm_activity': {
'description': '',
'value': },
'humidity': '',
'id': ,
'moon': {'description': '',
'sunrise': '',
'sunset': '',
'title': ''},
'percipitation': '',
'percipitation_in_radius': '',
'pressure': {
'h_pa': '',
'in_hg': '',
'mm_hg_atm': ''},
'road_condition': '',
'sun': {
'description': '',
'sunrise': '',
'sunset': '',
'title': ''},
'temperature': {
'celsius': '',
'fahrenheit': ''},
'uvb_index': {
'description': '',
'value': },
'visibility': '',
'wind': {'direction': '',
'gust': {
'km/h': '',
'm/s': '',
'mi/h': ''},
'speed': {
'km/h': '',
'm/s': '',
'mi/h': ''}}},
Note:
Description values like
humidity[description]
may contain text according to your region. For exampleSW
(South-West) in English ->ЮВ
(Юго-Восток) in Russian, and so on.
But sometimes some field may have No data
in them. That's probably because gismeteo didn't show this field, or it was empty. Also, returning dict()
may contain _error
field if there was any.
If you have any questions or issues, you can see all issues here, alternatively you can create a new issue
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
File details
Details for the file gismeteoscraper-0.0.3.tar.gz
.
File metadata
- Download URL: gismeteoscraper-0.0.3.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0012f7ecf6ee67fb51a66efc02157ab29882a3dd8605b7db2cfb6c7cd0f608d6 |
|
MD5 | 88d3250ecd961ede4cf03ebbd9295691 |
|
BLAKE2b-256 | efa6c207ac221099ffbacbb83b49b666ea01058a510fde32d17327a2131d1b73 |