meteociel.utils.get_data_from_html
- meteociel.utils.get_data_from_html(response: Response, conditions: dict = None, **kwargs)
Search in the given
responsefor a table that meet the given conditions and return the parsed data in a list where each element is a column of the html tabular.Parameters
- response
requests.models.Response The response of the request.
- conditions
dict, optionnal The conditions to meet. This dictionnary will be passed to
BeautifulSoup.find.- kwargs
The keyword-only arguments to be passed to
extract_data.
Returns
- out
list A list that contains all the column of the given html code.
Raises
- ConnectionError
This exception is raised in the case of the connection failed, the HTTP error code is given.
- ValueError
This exception is raised in the case of unavailable data. The URL is given so the user can get the data by hand if needed.
- response