Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
twitter-api-example
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dsbd
twitter-api-example
Commits
6cf70379
Commit
6cf70379
authored
6 years ago
by
Alessandro Elias
Browse files
Options
Downloads
Patches
Plain Diff
Remove credentials
Signed-off-by:
Alessandro Elias
<
aelias@c3sl.ufpr.br
>
parent
a7503989
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
twitter-api-example.py
+13
-14
13 additions, 14 deletions
twitter-api-example.py
with
13 additions
and
14 deletions
twitter-api-example.py
+
13
−
14
View file @
6cf70379
...
@@ -12,7 +12,6 @@ logging.basicConfig(level=logging.INFO)
...
@@ -12,7 +12,6 @@ logging.basicConfig(level=logging.INFO)
def
search
(
api
,
sincedate
,
untildate
,
csvFile
,
jsonFile
):
def
search
(
api
,
sincedate
,
untildate
,
csvFile
,
jsonFile
):
searchQuery
=
'
((cota OR cotas OR universidade OR universidades) AND (racial OR raciais)) OR ((universidade OR universidades) AND (cota OR cotas))
'
searchQuery
=
'
((cota OR cotas OR universidade OR universidades) AND (racial OR raciais)) OR ((universidade OR universidades) AND (cota OR cotas))
'
maxTweets
=
10000000
maxTweets
=
10000000
tweetsPerQry
=
100
# this is the max the API permits
tweetsPerQry
=
100
# this is the max the API permits
...
@@ -72,10 +71,10 @@ def search(api, sincedate, untildate, csvFile, jsonFile):
...
@@ -72,10 +71,10 @@ def search(api, sincedate, untildate, csvFile, jsonFile):
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
####input your credentials here
####input your credentials here
consumer_key
=
'
pcn6szyFLVnzxDclKazZ3tQPI
'
consumer_key
=
''
consumer_secret
=
'
OGKptAjYnoh33mvPEkBPQgcApNXFysbCUx2CjQwjtHhr7Z9unO
'
consumer_secret
=
''
access_token
=
'
1127995977963646977-vqZMlKE8vJLSFMWmL6J9ouEZBncPi1
'
access_token
=
''
access_token_secret
=
'
xT6WMGkUZJULIMAwpG0AUWtOFYDdGMBYAFSHUZIo9NLYh
'
access_token_secret
=
''
auth
=
tweepy
.
OAuthHandler
(
consumer_key
,
consumer_secret
)
auth
=
tweepy
.
OAuthHandler
(
consumer_key
,
consumer_secret
)
auth
.
set_access_token
(
access_token
,
access_token_secret
)
auth
.
set_access_token
(
access_token
,
access_token_secret
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment