Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
Optimize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ihirsche committed Mar 2, 2024
1 parent 61310f1 commit 5b7d900
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,28 @@
import os
import re
import shutil
import sys
import time
import traceback
from pathlib import Path
from time import sleep
from urllib.parse import quote

import click
import deezer
import numpy as np
import selenium.common.exceptions
from deezer import Track, Playlist, Album, Artist
from deezer.exceptions import DeezerAPIException
from selenium import webdriver
from selenium.common.exceptions import ElementClickInterceptedException
from selenium.common.exceptions import ElementClickInterceptedException, NoSuchElementException
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from tabulate import tabulate

import ui_elements
from custom_solver import CustomRecaptchaSolver
from exceptions import UnsupportedFormatException, UnsupportedBitrateException, UIException, DownloaderException, \
InvalidInput, DownloadTimeoutException
from custom_solver import CustomRecaptchaSolver
from tagger import DeezerTagger
import click

# logging setup
logger = logging.getLogger("mp3downloader")
Expand Down Expand Up @@ -282,7 +280,7 @@ def on_download_success(filepath):
except DownloadTimeoutException as e:
logger.error(f"Download timeout: {track.artist.name} - {track.title}", exc_info=e)
self.on_download_tineout()
except (selenium.common.exceptions.NoSuchElementException, Exception) as e:
except (NoSuchElementException, Exception) as e:
logger.error(f"Could not download {track.artist.name} - {track.title}", exc_info=e)
finally:
self.wait_engine.pause()
Expand Down

0 comments on commit 5b7d900

Please sign in to comment.