Skip to content

Commit 9d4b80a

Browse files
committed
change code style for ai checks
1 parent 76db52a commit 9d4b80a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Apple-Music-Scraper/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,7 @@ def artist_scrape(url="https://music.apple.com/us/artist/king-princess/134996853
899899

900900
return result
901901

902+
902903
def test_all_functions():
903904
"""
904905
Run integration-style tests for all scraper functions.

Apple-Music-Scraper/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from bs4 import BeautifulSoup
55

66

7-
def get_cover(url, width, height, format="jpg", crop_option=""):
7+
def get_cover(url, width, height, img_format="jpg", crop_option=""):
88
"""
99
Generate a full Apple Music artwork URL with proper width, height, format, and crop settings.
1010
@@ -16,8 +16,8 @@ def get_cover(url, width, height, format="jpg", crop_option=""):
1616
Target width of the image.
1717
height : int or str
1818
Target height of the image.
19-
format : str, optional
20-
Image format (jpg, png, etc.). Defaults to `"jpg"`.
19+
img_format : str, optional
20+
Image format (jpg, png, etc.). Defaults to "jpg".
2121
crop_option : str, optional
2222
Cropping mode used by Apple Music artwork URLs. Defaults to empty string.
2323
@@ -39,7 +39,7 @@ def get_cover(url, width, height, format="jpg", crop_option=""):
3939
url.replace("{w}", str(width))
4040
.replace("{h}", str(height))
4141
.replace("{c}", crop_option)
42-
.replace("{f}", format)
42+
.replace("{f}", img_format)
4343
)
4444
return new_url
4545
except (TypeError, AttributeError):

0 commit comments

Comments
 (0)