used for a request the class method

This commit is contained in:
Hellow 2023-03-27 17:53:51 +02:00
parent 4e4e72104d
commit ac474c6079

View File

@ -300,12 +300,10 @@ class EncyclopaediaMetallum(Page):
@classmethod
def fetch_artist_attributes(cls, artist: Artist, url: str) -> Artist:
r = cls.API_SESSION.get(url)
if r.status_code != 200:
LOGGER.warning(f"code {r.status_code} at {url}")
r = cls.get_request(url)
if r is None:
return artist
soup = BeautifulSoup(r.text, 'html.parser')
soup: BeautifulSoup = cls.get_soup_from_response(r)
country: pycountry.Countrie = None
formed_in_year: int = None