Created
December 5, 2022 21:19
-
-
Save Bmohsen/3d8c0cef31bbc6d09994261dbf5c10e5 to your computer and use it in GitHub Desktop.
download all unicon(line version) font icon with python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
def download_fonts(): | |
base_url = 'https://unicons.iconscout.com/release/v4.0.0/fonts/line/' | |
file_formats = ['eot', 'woff', 'ttf', 'woff2', 'svg'] | |
for i in range(21): | |
for ext in file_formats: | |
file_name = f'unicons-{i}.{ext}' | |
print(f'downloading {file_name} ...') | |
response = requests.get(base_url + file_name) | |
open(file_name, 'wb').write(response.content) | |
print(f'download completed ✅') | |
print('all fonts downloaded. 😎') | |
if __name__ == '__main__': | |
download_fonts() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment