Skip to main content

quoras

A Python package to collect data from Quora.

Installation

The package is available on PyPI. Simply run the following command:

pip install quoras

Setup

Create a folder called chrome_path in the same directory as your source file. Download the ChromeDriver from here and place the chromedriver.exe file in the newly created folder.

Initialize

You need to have account on Quora (or its language-specific forum) to collect data from it. Initialize the Quora class as following providing your credentials and language code. The language codes can be found here.

quora = Quora ('email-address', 'password', 'language-code')

Usage

This package allows you to call several functions. Search with keywords for questions, topics or users with function search(keyword, type='post', scroll_count=1). Change type to 'topic' or 'user' to search topic RSS pages or user profiles respectively. You can pass a value for scroll_count to control how many scrolls the web browser will automatically do.

posts = quora.search('ancient history', 'post', scroll_count=1)
topics = quora.search('finance', 'topic', scroll_count=1)
users = quora.search('Dipto Das', 'user', scroll_count=1)

There are alternative ways to search posts or users. You can call search_posts(keyword, scroll_count=1) function that searches for posts with specified keyword without requiring explicitly indicating type. Similarly, search_users(keyword, scroll_count=1) function to search users containing keyword in their profile names. You can also pass a value for scroll_count to control how many scrolls the web browser will automatically do.

questions = quora.search_posts('ancient history', scroll_count=1)
users = quora.search_users('Dipto Das', scroll_count=1)

To search for Q/A threads with a specific user-assigned topic tag, you can simply call search_topic(topic, scroll_count=1) function as follows:

topic_questions = search_topic('politics', scroll_count=5)

If you already have an url, you can directly search details about that entry. If it is an url to a Q/A thread, then it will return the question, topics, answers, participating users, and Quora suggested related questions. If it is an url to a user profile, then it will return statistics about the user (e.g., number of public answers, number of questions, number of shares, number of posts, number of followings, and number of followers), and links to top (defined by Quora) posts from the user. To use this function, you have to call search_url(url) function.

qathread_details = quora.search_url('https://bn.quora.com/আসামকে-কেন-সবাই-অসম-বলছে')
user_details = quora.search_url('https://www.quora.com/profile/Dipto-Das-1')

Importantly, quoras can can retrieve the full text in an answer given its url. For that, you need to call get_full_answer(url) function as following:

full_answer = quora.get_full_answer('https://bn.quora.com/বিজ্ঞানীদের-মধ্যেও-কি/answers/150612153')

Metadata

Release files for quoras 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quoras 1.1.1
File Size Uploaded Provenance Actions
quoras-1.1.1.tar.gz 6.5 kB Without provenance Details for quoras-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for quoras 1.1.1
File Interpreter ABI Platform Actions
quoras-1.1.1-py3-none-any.whl Python 3 none any Details for quoras-1.1.1-py3-none-any.whl

Total release size: 13.8 kB

Release files / quoras-1.1.1.tar.gz

Download URL quoras-1.1.1.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2a271f0351e6ce549b0846d809b0a90f6de8edbfb7dd04f39fecca88b9d03eb5
BLAKE2b-256 checksum
How to use checksums
cad0a9050edb7075d8d87dce8d2d88d1de5ea51439cd9054b78ec346993b8153
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Release files / quoras-1.1.1-py3-none-any.whl

Download URL quoras-1.1.1-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eacc259154f7b0157816dc596615fe57caa76a2a70c1c1f3e9e35a6845d1a971
BLAKE2b-256 checksum
How to use checksums
abfd41598a3c76f2bb9c224c42a96fafc15aee012eb5ecd927fabd751e7e4c0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Security for quoras 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page