Skip to main content

A Python module to fetch and parse data from Quora.

Installation

You will need Python 2. pip is recommended for installing dependencies.

Install using pip:

pip install quora

Usage

User statistics

from quora import User

user = User('Christopher-J-Su')

# Get user activity
activity = user.activity

# Do stuff with the parsed activity data
print activity

# Get user statistics
stats = user.stats

# Take a gander
print stats

Questions

from quora import Quora

# Get question statistics
question = Quora.get_question_stats('what-is-python')

# question is:
# {
#     'want_answers': 3,
#     'question_text': u'What is python?',
#     'topics': [u'Science, Engineering, and Technology', u'Technology', u'Electronics', u'Computers'],
#     'question_details': None, 'answer_count': 1,
#     'answer_wiki': '<div class="hidden" id="answer_wiki"><div id="ld_mqcfmt_15628"><div id="__w2_po3p1uM_wiki"></div></div></div>',
# }

Answers

from quora import Quora

# The function can be called in any of the following ways.
answer = Quora.get_one_answer('http://qr.ae/6hARL')
answer = Quora.get_one_answer('6hARL')
answer = Quora.get_one_answer(question, author) # question and answer are variables

# answer is:
# {
#     'want_answers': 8,
#     'views': 197,
#     'author': u'Mayur-P-R-Rohith',
#     'question_link': u'https://www.quora.com/Does-Quora-similar-question-search-when-posing-a-new-question-work-better-than-the-search-box-ove',
#     'comment_count': 1,
#     'answer': '...',
#     'upvote_count': 5
# }

# Get the latest answers from a question
latest_answers = Quora.get_latest_answers('what-is-python')

Features

Currently implemented

  • User statistics

  • User activity

  • Question statistics

  • Answer statistics

Todo

  • Detailed user information (followers, following, etc.; not just statistics)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quora-0.1.20.7.tar.gz (17.9 kB view details)

Uploaded Source

File details

Details for the file quora-0.1.20.7.tar.gz.

File metadata

  • Download URL: quora-0.1.20.7.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for quora-0.1.20.7.tar.gz
Algorithm Hash digest
SHA256 48b0cb8f037f6ebe43a269c9514c7422d03cb50c2641b57ea62f15e4cdb99c79
MD5 88f2c65b1a4ddbf82ade526b7cad99c9
BLAKE2b-256 9df3c6cf50ac7c23e007e32db38a0de459932598ed8a2dafc5edd631a8a3729d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page