quora-api An unofficial API for Quora.

我要开发同款
匿名用户2021年12月10日
41阅读
开发技术Python
所属分类Web应用开发、Web框架
授权协议View license

作品详情

QuoraAPINote:partsofthisAPImaybebrokenduetochangesonQuora'send.Pleaseopenissuesandmakepullrequestsregardingthisatcsu/pyquora.

AnunofficialAPIforQuora.

TableofContentsAPIUsageFeaturesInstallationContributingAPIUsageAPIBaseURL:https://quora.christopher.suEndpointsSummaryGET:/users/<user>GET:/users/<user>/activityGET:/users/<user>/activity/answersGET:/users/<user>/activity/user_followsGET:/users/<user>/activity/want_answersGET:/users/<user>/activity/upvotesGET:/users/<user>/activity/review_requestsGET:/questions/<question>GET:/users/<user>Example

Exampleusage:GEThttps://quora.christopher.su/users/Christopher-J-Su

Exampleresult:

{"answers":301,"blogs":null,"edits":5576,"followers":173,"following":167,"name":"Christopher-J-Su","posts":6,"questions":110,"topics":null,"username":"Christopher-J-Su"}

Note:duetorecentQuoraUIchanges,theblogsandtopicsstatisticsarecurrentlynotworkingandwillalwaysreturnnull.

GET:/users/<user>/activity

Gettheuser'sactivity.

Example

Exampleusage:GEThttps://quora.christopher.su/users/Christopher-J-Su/activity

Output(excerpt):

{"activity":[{"link":"https://www.quora.com/University-of-Washington/What-does-the-UW-CS-department-gain-from-barring-other-UW-students-from-taking-its-courses/answer/Christopher-J-Su","published":"Tue,25Feb201400:10:55GMT","summary":"<--...--->","title":"WhatdoestheUWCSdepartmentgainfrombarringotherUWstudentsfromtakingitscourses?"},{"link":"https://www.quora.com/Can-applied-math-students-take-CSE-majors-only-courses/answer/Christopher-J-Su","published":"Tue,25Feb201400:04:33GMT","summary":"<divstyle=\"color:#666666;\">ChristopherJ.Suaddedthisanswer.</div><br/><divid=\"ld_ihbjvp_3370\"><divstyle=\"font-weight:bold;color:#000000;\"><divclass=\"hover_menuhiddenhover_menu_widehover_menu_cards\"id=\"__w2_qIjTQfx_menu\"style=\"display:none;\"><divclass=\"hover_menu_nub\"></div><divclass=\"hover_menu_contents\"id=\"__w2_qIjTQfx_menu_contents\"></div></div><aclass=\"user\"href=\"https://www.quora.com/Christopher-J-Su\"id=\"__w2_qIjTQfx_link\">ChristopherJ.Su</a></div><br/>IthinkyoumightneedtofilloutaCSEcoursepetitiontotakea300+-levelCSEcourseasanon-major:<spanclass=\"qlink_container\"><aclass=\"external_link\"href=\"https://www.cs.washington.edu/prospective_students/undergrad/petition/\"target=\"_blank\">PetitionforNon-Majors</a></span>.<br/><br/><ahref=\"https://www.quora.com/Can-applied-math-students-take-CSE-majors-only-courses\"style=\"font-weight:bold;\">SeequestiononQuora</a></div>","title":"CanappliedmathstudentstakeCSEmajorsonlycourses?"}],"last_updated":"Thu,24Jul201405:32:49GMT","username":"Christopher-J-Su"}GET:/users/<user>/activity/answers

Gettheuser'slatestanswers.

Example

Exampleusage:GEThttps://quora.christopher.su/users/Christopher-J-Su/activity/answers

Output(excerpt):

{"items":[{"id":"5:48afe1749959ac2b673b1094a13b6cb5#1418975956225507","link":"https://www.quora.com/I-need-a-summer-internship-but-I-dont-want-to-apply-because-theres-a-90-chance-Ill-get-rejected-What-should-I-do/answer/Christopher-J-Su","published":"Fri,19Dec201407:59:16GMT","summary":"<divid=\"ld_ftujiv_1299\"><divstyle=\"font-weight:bold;color:#000000;\"><divclass=\"hover_menuhiddenhover_menu_cardshover_menu_widehover_menu_cards\"id=\"__w2_lHemksQ_menu\"style=\"display:none;\"><divclass=\"hover_menu_nub\"></div><divclass=\"hover_menu_contents\"id=\"__w2_lHemksQ_menu_contents\"></div></div><aclass=\"user\"href=\"https://www.quora.com/Christopher-J-Su\"id=\"__w2_lHemksQ_link\">ChristopherJ.Su</a></div><br/>Apply,interview,fail,repeat.Keepfailing.Eventually,you&#039;llnoticeyoustopfailingasmuchasyoudidbefore.Then,you&#039;llsuddenlystartpassinginterviews.Then,you&#039;llstartgettingoffers.<br/><br/>Don&#039;tgetlockedupinthemindsetthatyouwon&#039;tmakeit.Ifyounevereventry,you&#039;llnevergetaninternship.Havinginterviewsscheduledwillmotivateyoutostudyandprepareforthem.Doingtheinterviewsthemselvesisgreatpractice.<br/><br/><ahref=\"https://www.quora.com/I-need-a-summer-internship-but-I-dont-want-to-apply-because-theres-a-90-chance-Ill-get-rejected-What-should-I-do\"style=\"font-weight:bold;\">SeequestiononQuora</a></div>","title":"Ineedasummerinternship,butIdon'twanttoapplybecausethere'sa90%chanceI'llgetrejected.WhatshouldIdo?"}]}GET:/users/<user>/activity/user_follows

Gettheuser'slatestuserfollows.

Example

Exampleusage:GEThttps://quora.christopher.su/users/Christopher-J-Su/activity/user_follows

Output(excerpt):

{"items":[{"id":"4:c219dbf80746802cf733f0cb3d5218c2#1419000196656496","link":"https://www.quora.com/Inna-Vishik","published":"Fri,19Dec201414:43:16GMT","summary":"","title":"InnaVishik"},{"id":"4:bd7227ae22f8f8cd9acfcb906ae8f6ea#1418975190093378","link":"https://www.quora.com/Mira-Zaslove","published":"Fri,19Dec201407:46:30GMT","summary":"","title":"MiraZaslove"}]}GET:/users/<user>/activity/want_answers

Gettheuser'slatestfollowedquestions.

Example

Exampleusage:GEThttps://quora.christopher.su/users/Christopher-J-Su/activity/want_answers

Output(excerpt):

{"items":[{"id":"1:03fb57d2ccb343bff9bb608c6978f5c7#1418895552348316","link":"https://www.quora.com/What-is-a-typical-day-like-for-a-software-engineer-at-Google","published":"Thu,18Dec201409:39:12GMT","summary":"<divid=\"ld_veqgnk_1856\"><spanid=\"ld_veqgnk_1857\">5Answers</span><br/><br/><ahref=\"https://www.quora.com/What-is-a-typical-day-like-for-a-software-engineer-at-Google\"style=\"font-weight:bold;\">SeequestiononQuora</a></div><br/>","title":"WhatisatypicaldaylikeforasoftwareengineeratGoogle?"}]}GET:/users/<user>/activity/upvotes

Gettheuser'slatestupvotedanswers.

Example

Exampleusage:GEThttps://quora.christopher.su/users/Christopher-J-Su/activity/upvotes

Output(excerpt):

{"items":[{"id":"5:cf756de40913266d1c7bb0ff1306a384#1419235600718606","link":"https://www.quora.com/What-criteria-are-Google-interns-graded-on-for-performance-reviews/answer/Kshitij-Gopal","published":"Mon,22Dec201408:06:40GMT","summary":"<divid=\"ld_gurtiz_2329\"><divstyle=\"font-weight:bold;color:#000000;\"><divclass=\"hover_menuhiddenhover_menu_cardshover_menu_widehover_menu_cards\"id=\"__w2_EisD67h_menu\"style=\"display:none;\"><divclass=\"hover_menu_nub\"></div><divclass=\"hover_menu_contents\"id=\"__w2_EisD67h_menu_contents\"></div></div><aclass=\"user\"href=\"https://www.quora.com/Kshitij-Gopal\"id=\"__w2_EisD67h_link\">KshitijGopal</a></div><br/>I&#039;mnotsureonwhatbasistheearlieranswerwasgiven,butassomeonewhomanagedinternsdirectlyatGoogleI&#039;llgivethisoneacrack.<br/><br/>Internsareevaluatedonanumberofparameters,mostofwhichareconfidentialbutrestassuredtherearearangeofperformancecriteria,parametersthatmeasureinitiative,enthusiasm,workethicandfinallyGoogley-ness.Goingaboveandbeyondisexpectedandwillhelpyouinyourfinalevaluation,ifyou&#039;reanaspiringinternthenrememberthat.<br/><br/>Justtoclarifytheotheranswercompletely-thereisnothingrandomaboutitandcertainlyno&quot;lottery&quot;system.I&#039;veseenandfilledtheevaluationform,atGooglenotmuchislefttoluck.<br/><br/><ahref=\"https://www.quora.com/What-criteria-are-Google-interns-graded-on-for-performance-reviews\"style=\"font-weight:bold;\">SeequestiononQuora</a></div>","title":"WhatcriteriaareGoogleinternsgradedonforperformancereviews?"}]}GET:/users/<user>/activity/review_requests

Gettheuser'slatestreviewrequests.

Example

Exampleusage:GEThttps://quora.christopher.su/users/Aaron-Ounn/activity/review_requests

Output(excerpt):

{"items":[{"id":"1:24ee4ef5eff0c53d8247f5a45e83f5e3#1418745295543236","link":"https://www.quora.com/Reviews-of-Elixir-programming-language","published":"Tue,16Dec201415:54:55GMT","summary":"<divid=\"ld_qxesgk_3346\"><spanid=\"ld_qxesgk_3347\">0Answers</span><br/><br/><ahref=\"https://www.quora.com/Reviews-of-Elixir-programming-language\"style=\"font-weight:bold;\">WriteanansweronQuora</a></div><br/>","title":"Reviewsof:Elixir(programminglanguage)"}]}GET:/questions/<question>

Getstatisticsonaquestion.

Example

Exampleusage:GEThttps://quora.christopher.su/questions/If-space-is-3-dimensional-can-time-also-be-3-dimensional

Output:

{"answer_count":6,"topics":["Science,Engineering,andTechnology","Science","PhysicalSciences","Physics","Time(physics)"],"want_answers":7}GET:/answers/<answer_short_link>

Getananswerbyitsshortlink.

Example

Exampleusage:GEThttps://quora.christopher.su/answers/6hARL

Output:

{"answer":"<div...</div>","author":"Mayur-P-R-Rohith","comment_count":1,"question_link":"https://www.quora.com/Does-Quora-similar-question-...","upvote_count":6,"views":227,"want_answers":8}GET:/answers/<question>/<author>

Getananswerbyitsquestionanditsauthor.

FeaturesCurrentlyimplementedUserstatisticsUseractivityQuestionstatisticsAnswerstatisticsTodoDetaileduserinformation(followers,following,etc.;notjuststatistics)UnittestsCachedatawithmemcachedInstallation

YouwillneedPython2.pipisrecommendedforinstallingdependencies.

ToruntheAPIlocally:

$pipinstall-rrequirements.txt$pythonserver.pyContributing

Feelfreetosubmitapullrequestoranissue!QuoraAPIusesthepyquorapackage.

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论