Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

twitter scraping python

Use a python library called twint this is a basic example and you can do alot more using their documentation


pip install twint

import twint
#configuration
config = twint.Config()
config.Search = "bitcoin"
config.Lang = "en"
config.Limit = 100
config.Since = "2019–04–29"
config.Until = "2020–04–29"
config.Store_json = True
config.Output = "custom_out.json"
#running search
twint.run.Search(config)
Comment

python code for twitter scraping using tweepy

# import the module
import tweepy
  
# assign the values accordingly
consumer_key = ""
consumer_secret = ""
access_token = ""
access_token_secret = ""
  
# authorization of consumer key and consumer secret
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
  
# set access to user's access key and access secret 
auth.set_access_token(access_token, access_token_secret)
  
# calling the api 
api = tweepy.API(auth)
  
# the ID of the user
id = 57741058
  
# fetching the user
user = api.get_user(id)
  
# fetching the description
description = user.description
  
print("The description of the user is : " + description)
Comment

PREVIOUS NEXT
Code Example
Python :: pandas interpolate string 
Python :: upload folder to s3 bucket python 
Python :: using pypyodbc 
Python :: scapy get packet source ip address python 
Python :: change group box border color pyqt5 
Python :: numpy percentile 
Python :: python send email from icloud 
Python :: how to import ui file in pyside 
Python :: # convert string to date 
Python :: how to loop through lines python 
Python :: how to maximize the screen in selenium 
Python :: argparse parse path 
Python :: 2 functions at a time py 
Python :: get image data cv2 
Python :: python selenium check if browser is open 
Python :: turn off yticklabels 
Python :: how to know the column number of a dataframe in pandas 
Python :: bag of word scikit learn 
Python :: get raster corners python 
Python :: a softmax function 
Python :: create a list of pandas index 
Python :: pandas groupby 
Python :: read csv pandas nrow 
Python :: print value of array python 
Python :: image resolution extracting python 
Python :: ocaml returns the last element of a list 
Python :: python dictionary map function 
Python :: add element to array list python 
Python :: register models in admin 
Python :: multiple model search in django rest framework 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =