Skip to content

Commit

Permalink
create new scrap func
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannimin committed Mar 30, 2024
1 parent 03a1547 commit c4239d4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def get_player_info(url_page: str) -> dict:
player_info['country_img'] = re.search(r"url\('(.+?)'\)",
div_tag.find('span', class_='f-i').get('style')).group(1)
player_info['img'] = div_tag.find("img", class_="").get('src')
player_info['club_img'] = None # TO DO
player_info['club'] = div_tag.find('strong', text='Club:').find_next('a').text.strip()
player_info['age'] = calculate_age(div_tag.find('span', {'id': 'necro-birth'}).get('data-birth'))

Expand Down Expand Up @@ -182,6 +183,10 @@ def get_player_info(url_page: str) -> dict:
return player_info


def get_club_img():
return


def get_image(img_url: str):
try:
response = requests.get(img_url)
Expand Down

0 comments on commit c4239d4

Please sign in to comment.