From c1b587c0f606fde0950584105c422805c625bb50 Mon Sep 17 00:00:00 2001 From: nedlir <66902031+nedlir@users.noreply.github.com> Date: Wed, 24 Jun 2020 14:35:05 +0300 Subject: [PATCH] Removed global variables --- pylibgen.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pylibgen.py b/pylibgen.py index 17062b8..ba8ef1c 100644 --- a/pylibgen.py +++ b/pylibgen.py @@ -5,9 +5,15 @@ from urllib.parse import urlencode from tabulate import tabulate from bs4 import BeautifulSoup -from settings import * +DOWNLOAD_PATH = "/home/blackout/Descargas" # Where do you want the books to be downloaded. Default is the script directory. +N_AUTHORS = 1 # Maximum of authors displayed. +MAX_CHARS_AUTHORS = 25 # Maximum characters displayed for the author. Change according to N_AUTHORS. +MAX_CHARS_TITLE = 50 # Maximum characters displayed for the book title +MAX_CHARS_PUBLISHER = 20 # Maximum characters displayed for the publisher. +SHOW_MIRRORS = True # Set to True or False depending if you want the program to show the download mirrors. + def getSearchResults(term, page, column): params = urlencode({'req': term, 'column': column, 'page': page}) url = 'http://libgen.io/search.php?&%s' % params