Esempio n. 1
0
def search_book(by, value):
    s = LibgenSearch()
    if by == 'title':
        results = s.search_title(value)
    elif by == 'author':
        results = s.search_author(value)
    return results
Esempio n. 2
0
def byauthor():
    name = request.args.get('authorname')
    if name:
        s = LibgenSearch()
        books = s.search_author(name)
        return jsonify({"books":books})