def _extract_metrics(self, page, status_code=200, id=None):
        if status_code != 200:
            if status_code == 404:
                return {}
            else:
                raise(self._get_error(status_code))

        if not "sources" in page:
            raise ProviderContentMalformedError

        json_response = provider._load_json(page)
        this_article = json_response[0]["sources"][0]["metrics"]

        dict_of_keylists = {
            'plosalm:html_views' : ['html'],
            'plosalm:pdf_views' : ['pdf']
        }

        metrics_dict = provider._extract_from_data_dict(this_article, dict_of_keylists)

        return metrics_dict
dataset/ETHPy150Open Impactstory/total-impact-core/totalimpact/providers/plosalm.py/Plosalm._extract_metrics/original