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
02ba246d
Commit
02ba246d
authored
5 years ago
by
Alessandro Elias
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug; set count of tweets outside of loop
Signed-off-by:
Alessandro Elias
<
ale.elias2011@gmail.com
>
parent
6cf70379
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
+6
-4
6 additions, 4 deletions
twitter-api-example.py
with
6 additions
and
4 deletions
twitter-api-example.py
+
6
−
4
View file @
02ba246d
...
@@ -11,9 +11,11 @@ import logging
...
@@ -11,9 +11,11 @@ import logging
logging
.
basicConfig
(
level
=
logging
.
INFO
)
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))
'
##### You can change here
maxTweets
=
10000000
# Variable with the desireable query.
searchQuery
=
''
maxTweets
=
10000000
tweetsPerQry
=
100
# this is the max the API permits
tweetsPerQry
=
100
# this is the max the API permits
csvWriter
=
csv
.
writer
(
csvFile
)
csvWriter
=
csv
.
writer
(
csvFile
)
...
...
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