Fetches and parses data from Quora.
Project description
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 Quora
quora = Quora()
# Get user activity
activity = quora.get_activity('Christopher-J-Su')
# Do stuff with the parsed activity data
activity.upvotes
activity.user_follows
activity.want_answers
activity.answers
activity.review_requests
# Get user statistics
stats = quora.get_user_stats('Christopher-J-Su')
# 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)
Contribute
Check out the issues on GitHub and/or make a pull request to contribute!
Projects using pyquora
`quora-api <https://github.com/csu/quora-api>`_ – A REST API for Quora.
`quora-backup <https://github.com/csu/quora-backup>`_ – A Python package and CLI for backing up Quora data.
Project details
Release history Release notifications | RSS feed
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.2.tar.gz
(18.3 kB
view details)
File details
Details for the file quora-0.1.20.2.tar.gz.
File metadata
- Download URL: quora-0.1.20.2.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bc04e03d5d8ebde72b31887c41a4bbfe3f75eb7b615b80e6cb526fd16b89b50
|
|
| MD5 |
f73b95da68604b8c3c732655d805fff2
|
|
| BLAKE2b-256 |
976a7eac002a47fe6ec63b28e565032870e07cc9fbb8959868314df55c7fd4c4
|