Skip to content

viveksb007/pybrainyquote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pybrainyquote

Python Package to get quotes from BrainyQuote

Install using pip:

pip install brainyquote

Dependencies :

 beautifulsoup4
 requests

Install Dependencies :

pip install beautifulsoup4
pip install requests

Usage

Get quotes from topic

from brainyquote import pybrainyquote

print(pybrainyquote.get_quotes('inspirational')) # returns one quote from the 'inspirational' topic
print(pybrainyquote.get_quotes('motivational', 3))  # returns list with 3 quotes from the 'motivational' topic

All parameters suggested in Topics are supported.

Get a single quote

from brainyquote import pybrainyquote

print(pybrainyquote.get_random_quote())  # returns random quotes on popular_choice

Change popular_choice for more random quotes

Quote

All quotes returned follow the same format. First they contain the quote itself in single quotes, which is followed by the author.

Example

from brainyquote import pybrainyquote

quote = pybrainyquote.get_random_quote() 
# may return: "'Choosing to be positive and having a grateful attitude is going to determine how you're going to live your life.' Joel Osteen"

Features

  • returns number of quotes in list specified as get_quotes( 'topic', number_of_quotes )
  • return any random quote from popular topics as get_random_quote()

License

(c) 2016 Vivek Singh Bhadauria

This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this app. If not, see http://www.gnu.org/licenses/.

About

Python Package to get quotes from BrainyQuote.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages