Skip to content

Latest commit

 

History

History
54 lines (31 loc) · 1005 Bytes

README.md

File metadata and controls

54 lines (31 loc) · 1005 Bytes

PyBrainyquote

Get quotes from brainyquote. Make you life positive. It is more powerful then viveksb007/pybrainyquote

Requirements

requests

bs4

furl

Download

pip install pybrainyquote

Why

The original one brainyquote is too simple.

Grammar

Import

from pybrainyquote import *

Get quotes

Quote.today(topic=what you like) # get today topic

get_popular_topics() # have a look at the lists of popular topics, if you do not have any idea
get_topics()
get_authors()

Quote.find_all(topic)     # just try the following
Quote.find(topic)
Quote.find(topic)

Quote.choice_yaml(yamlfile) # choose a quote in yaml files randomly
Quote.read_yaml(yamlfile)

In most cases, we need not operate Quote object, and the staticmethods are used only.

Future

Define a search engine for quotes, and a method to get one quote randomly. (Completed partly)