Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/freakwill/pybrainyquote

🖋️Get quotes from brainyquote.com
https://github.com/freakwill/pybrainyquote

brainyquote bs4-requests pybrainyquote python quotes yaml

Last synced: 3 months ago
JSON representation

🖋️Get quotes from brainyquote.com

Awesome Lists containing this project

README

        

# PyBrainyquote

Get quotes from brainyquote. Make you life positive. It is more powerful then [viveksb007/pybrainyquote](https://github.com/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)