Skip to content

Commit dabb27c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 6609301 commit dabb27c

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

web_programming/fetch_anime_and_play.py

+11-5
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,21 @@ def download_video(download_url: str, output_filename: str):
199199
episode_url, download_url = get_anime_episode(chosen_episode["url"])
200200
print(f"\nTo watch, ctrl+click on {episode_url}.")
201201
print(f"To download, ctrl+click on {download_url}.")
202-
202+
203203
# Add an option to download or not
204-
download_choice = input("\nDo you want to download this episode? (yes/no): ").strip().lower()
204+
download_choice = (
205+
input("\nDo you want to download this episode? (yes/no): ")
206+
.strip()
207+
.lower()
208+
)
205209
if download_choice in ["yes", "y"]:
206210
output_filename = f"{chosen_anime['title']} - {chosen_episode['title']}.mp4" # Change extension as needed
207211
download_video(download_url, output_filename)
208-
print(f"{chosen_episode['title']} has been downloaded as {output_filename}.")
212+
print(
213+
f"{chosen_episode['title']} has been downloaded as {output_filename}."
214+
)
209215
else:
210216
print("Download skipped.")
211217

212-
#if error download please install ffmeg
213-
#brew install ffmpeg for mac
218+
# if error download please install ffmeg
219+
# brew install ffmpeg for mac

0 commit comments

Comments
 (0)