Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion pylibgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down