Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Lab2
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
davyji2
Lab2
Commits
c1341314
Commit
c1341314
authored
3 years ago
by
davegii
Browse files
Options
Downloads
Patches
Plain Diff
added twitter
parent
9d4aca4a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
twitter.py
+27
-0
27 additions, 0 deletions
twitter.py
with
27 additions
and
0 deletions
twitter.py
0 → 100644
+
27
−
0
View file @
c1341314
from
credentials
import
*
import
tweepy
import
pandas
as
pd
import
csv
import
re
import
string
import
preprocessor
as
p
auth
=
tweepy
.
OAuthHandler
(
consumer_key
,
consumer_secret
)
auth
.
set_access_token
(
access_key
,
access_secret
)
api
=
tweepy
.
API
(
auth
,
wait_on_rate_limit
=
True
)
search_words
=
"
#wildfires
"
# enter your words
new_search
=
search_words
+
"
-filter:retweets
"
for
tweets
in
api
.
search_tweets
(
q
=
"
iphone
"
,
lang
=
"
en
"
,
count
=
100
,
since_id
=
0
):
print
(
tweets
.
text
.
encode
(
'
utf-8
'
))
# #for tweet in tweepy.Cursor(api.search_tweets,q=new_search,count=100,
# lang="en",
# since_id=0).items():
# print(tweet.text.encode('utf-8'))
\ No newline at end of file
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