web_programming.covid_stats_via_xpath ===================================== .. py:module:: web_programming.covid_stats_via_xpath .. autoapi-nested-parse:: This is to show simple COVID19 info fetching from worldometers site using lxml * The main motivation to use lxml in place of bs4 is that it is faster and therefore more convenient to use in Python web projects (e.g. Django or Flask-based) Attributes ---------- .. autoapisummary:: web_programming.covid_stats_via_xpath.fmt Classes ------- .. autoapisummary:: web_programming.covid_stats_via_xpath.CovidData Functions --------- .. autoapisummary:: web_programming.covid_stats_via_xpath.covid_stats Module Contents --------------- .. py:class:: CovidData Bases: :py:obj:`NamedTuple` .. py:attribute:: cases :type: int .. py:attribute:: deaths :type: int .. py:attribute:: recovered :type: int .. py:function:: covid_stats(url: str = 'https://www.worldometers.info/coronavirus/') -> CovidData .. py:data:: fmt :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """Total COVID-19 cases in the world: {} Total deaths due to COVID-19 in the world: {} Total COVID-19 patients recovered in the world: {}""" .. raw:: html