1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "directUrls": ["https://www.quora.com/What-is-Python-primarily-used-for"],
10 "onlyUnanswered": False,
11 "excludePromoted": False,
12 "includePromoted": True,
13 "includePromotionEvidence": True,
14 "maxResults": 10,
15 "minAnswerUpvotes": 0,
16 "filterAiAnswers": "include",
17 "topCommentsOnly": False,
18 "includeAnswers": True,
19 "includeMedia": True,
20 "includeOutboundLinks": True,
21 "includeRelatedQuestions": True,
22 "maxRelatedQuestions": 0,
23 "includeQuestionTopics": True,
24 "includeSpaceSettings": False,
25 "includeQuestionDetails": True,
26 "includeComments": False,
27 "includePostComments": False,
28 "maxCommentsPerPost": 10,
29 "includeEngagementBreakdown": False,
30 "includePostAuthorContext": False,
31 "maxPostAuthorContextItems": 10,
32 "includeProfileActivity": False,
33 "includeEntityGraph": False,
34 "maxGraphEdges": 1000,
35 "profileActivityTypes": [
36 "answer",
37 "question",
38 "post",
39 ],
40 "maxProfileActivityItems": 20,
41 "includeProfileSensitiveFields": True,
42 "includeSocialLinks": True,
43 "maxItemsPerTab": 20,
44 "maxAuthors": 1000,
45 "includeProfileSnapshot": False,
46 "includeRelatedContent": False,
47 "maxRelatedContent": 10,
48 "maxPostsPerSource": 0,
49 "includeTopicQuestions": True,
50 "maxTopicQuestions": 20,
51 "includeTopicPosts": False,
52 "maxTopicPosts": 20,
53 "includeRelatedTopics": True,
54 "maxRelatedTopics": 20,
55 "includeAnswerPreview": False,
56 "maxAnswerPreviews": 3,
57 "minAnswerPreviewUpvotes": 0,
58 "includeAuthorProfiles": False,
59 "includeAccessIssues": False,
60 "maxResultsPerSource": 0,
61}
62
63
64run = client.actor("crawlerbros/quora-scraper").call(run_input=run_input)
65
66
67print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
68for item in client.dataset(run.default_dataset_id).iterate_items():
69 print(item)
70
71