Fix stuff

This commit is contained in:
7x11x13
2021-04-27 15:11:39 -04:00
parent cb47f9ea82
commit 65d4753653
2 changed files with 36 additions and 35 deletions
+3 -1
View File
@@ -34,7 +34,6 @@ Formats:
""" """
import atexit, time, sys, urllib.request, os import atexit, time, sys, urllib.request, os
from logging import DEBUG
from docopt import docopt from docopt import docopt
from selenium import webdriver from selenium import webdriver
from selenium.webdriver.support.ui import Select from selenium.webdriver.support.ui import Select
@@ -136,6 +135,7 @@ def download_album(url):
init_driver() init_driver()
driver.get(url) driver.get(url)
wait() wait()
try:
button = driver.find_element_by_xpath(xpath['buy']) button = driver.find_element_by_xpath(xpath['buy'])
if button.text == 'Free Download': if button.text == 'Free Download':
logger.info('Album is Free Download') logger.info('Album is Free Download')
@@ -172,6 +172,8 @@ def download_album(url):
wait() wait()
checkout.click() checkout.click()
logger.info(f'Download link sent to {options["email"]}') logger.info(f'Download link sent to {options["email"]}')
except Exception as e:
return e
def download_label(url): def download_label(url):
+2 -3
View File
@@ -5,12 +5,11 @@ import free_bandcamp_downloader
setup( setup(
name='free-bandcamp-downloader', name='free-bandcamp-downloader',
version=free_bandcamp_downloader.__version__, version=free_bandcamp_downloader.__version__,
packaged=find_packages(), packaged=['free_bandcamp_downloader'],
author='7x11x13', author='7x11x13',
install_requires=[ install_requires=[
'selenium', 'selenium',
'docopt', 'docopt'
'rfc6266'
], ],
entry_points={ entry_points={
'console_scripts': [ 'console_scripts': [