Saravanan666/pypi-org huggingface dataset:
Package: twitter-hashtag-scraper
Twitter Hashtag ScraperUnofficial Twitter hashtag scraper using free proxies. No API keys requiredInstallationpipinstalltwitter-hashtag-scraperUsageImport the package and create an object of the scraper using:hashtag (str): hashtag to scrapx_guest_token (str): a valid token from Twitter. You can check the requests in your browser with Developer Tools, XHR filter and search for a request tohttps://api.twitter.com/2/search/adaptive.json? to obtain the value from the headers.use_proxy (boolean): boolean to activate proxies or not.output_path (str, optional): output path. Defaults to None.max_tweets (int, optional): max number of tweets to download else try to get tweets until scroll is over. Defaults to None.Then calling the method collect() will retrieve the data. You need to have a valid x_guest_token checking the requests with Twitter.fromtwitter_hashtag_scraperimportTwitterHashtagScraper

TwitterHashtagScraper(hashtag="#MalagaCF",x_guest_token="1331317358300979202",use_proxy=False,output_path="/Users/youruser/Desktop",max_tweets=60).collect()
Package: twitter-image-dl
What it doesDownload all images uploaded by a specified Twitter user.What you needPython 3 (>= 3.7)SetupFirst, you need to installtwitter-image-dl:$pipinstalltwitter-image-dlNext, you need to generate your api key and api secret key.
If you don't have them, go toTwitter Developersand create your application.
After you get your api key and api secret key, create a json file like this:{
  "api_key": "your api key",
  "api_secret": "your api secret key"
}UsageTo download the images the user of id "foo" has uploaded, enter the command
like the following on the command line:$ twt_img foo -c confidentials.jsonwhereconfidentials.jsonis the json file containing your api keys.
This command creates a directory calledfooand save images to that
directory.If you want to save images to a directory other thanfoo, use-dor--destargument to specify the destination.You can specify which size of images to download using the optional argument-s(or--size). There are five values you can specify:largemediumsmallorigthumbIf you don't specify this value, images oflargesize will be downloaded
by default.Using the--rtsflag, you can also download images contained in retweets.Provide a number to the-lor--limitargument (e.g.-l 25) to limit how
many tweets are inspected for images (starting with the most recent). Note that
if you're using--limitwithout--rts, the number of tweets inspected can
be smaller than the specified limit.TestingInstall dependencies for testing and run tests like this:$gitclonegit@github.com:morinokami/twitter-image-downloader.git
$cdtwitter-image-downloader
$pipenvinstall--dev
$pipenvruntest
Package: twitter-korean
twitter-korean-py는twitter-korean-text의 스칼라 코드를
참고하여 파이썬으로 새로 코딩하여 포팅한 라이브러리입니다.현재는 정규화(normalizer)만 가능하며, 나머지 기능(토큰화, 어근화, 어구 추출)은 아직 구현하지 않았습니다.JPype를 사용한 래퍼 인터페이스인twkorean과는 달리, twitter-korean-text의 스칼라/자바 코드를 사용하지 않은 순수 파이썬(pure-python) 코드입니다.설치 스크립트는 twitter-korean-text의 maven repository에서 JAR 파일을 다운받은 후, 사전 파일만을 압축 해제하여 사용합니다.이 개념은 twkorean을 참고하였습니다.파이썬 2.7에서는maven-artifact라는 툴을 사용하여 maven 없이 설치 가능합니다.파이썬 3.x에서는 maven(mvn)을 직접 실행해서 다운로드합니다.Examples>>>importtwitter_korean>>>text=u"한국어를 처리하는 예시입니닼ㅋㅋㅋㅋㅋ #한국어">>># Normalize>>>normalized=twitter_korean.normalize(text)>>>print(normalized)한국어를처리하는예시입니다ㅋㅋ#한국어>>># Tokenize>>>tokens=twitter_korean.tokenize(normalized)Traceback(mostrecentcalllast):NotImplementedError:...>>>tokens=[(u'한국어','Noun',0,3),(u'를','Josa',3,1),(u' ','Space',4,1),(u'처리','Noun',5,2),(u'하는','Verb',7,2),(u' ','Space',9,1),(u'예시','Noun',10,2),(u'입니','Adjective',12,2),(u'다','Eomi',14,1),(u'ㅋㅋ','KoreanParticle',15,2),(u' ','Space',17,1),(u'#한국어','Hashtag',18,4)]>>># Stemming>>>stemmed=twitter_korean.stem(tokens)Traceback(mostrecentcalllast):NotImplementedError:...>>># Phrase extraction>>>phrases=twitter_korean.extract_phrases(tokens)Traceback(mostrecentcalllast):NotImplementedError:...
Package: twitter-makeup
Make up your Twitter Profile! [python package]Small library to make up your twitter profile, from 🐴 to 🦄 !Here is adedicated docker serviceincluding a scheduler to use it directly without any development work.You can see it live on myTwitter profile🐦Examples 🦄ExampleResultChange the banner for the dayAnd the nightChange your display name the morningNico ☕And during the dayNico 💻And for the nightNico 😴Change your location when travelingBostonChange your description when attending an eventCurrently at #craftconf, let's have a chat 💬Install 📦pip install twitter-makeupConfigure 🛠️Twitter MakeUp allows to programmatically change your profile on your behalf.To configure it, you need to generate Twitter credentials.Follow the Twitter guide (OAuth 1.0a).Use it! 🦄importtweepyfromtwitter_makeupimportMakeUp# Configure Tweepyconsumer_key='YourKey'consumer_secret='YourSecret'access_token='YourAccessToken'access_secret='YourAccessSecret'auth=tweepy.OAuthHandler(consumer_key,consumer_secret)auth.set_access_token(access_token,access_secret)api=tweepy.API(auth,wait_on_rate_limit=True,wait_on_rate_limit_notify=True,compression=True)# Make up your profile 🦄makeup=MakeUp(api)# Change your bannerbanner_path='images/banner-night.jpg'makeup.change_banner_picture(banner_path)print('Banner picture has been changed using "'+banner_path+'" 🦄')# Change your profile pictureprofile_path='images/profile-weekend.jpg'makeup.change_profile_picture(profile_path)print('Profile picture has been changed using "'+profile_path+'" 🦄')# Change your profile nameprofile_name='Nicolas Dupont ☕'makeup.change_profile_name(profile_name)print('Profile name has been changed by "'+profile_name+'" 🦄')# Change your profile locationprofile_location='Nantes'makeup.change_profile_location(profile_location)print('Profile location has been changed by "'+profile_location+'" 🦄')# Change your profile descriptionprofile_description="Co-founder and CPO at @akeneopim\\n❤️ crafting products to create value for users and businesses\\n💬 and 📝 about product, engineering, teamwork, learnings"makeup.change_profile_description(profile_description)print('Profile description has been changed by "'+profile_description+'" 🦄')LicenseMITThird partyThis library uses the excellentTweepy, providing a wrapper around a small subset of Tweepy capabilities.
Package: twitter-markov
Create markov chain (”_ebooks”) accounts on Twitter. The audience for
this library is those with at least basic Python experience. Before you
set this up, you’ll need: * A twitter account * A twitter application
(register atdev.twitter.com) with
authentication keys for the account (read
more) * A text for the bot to learn
from, which can be a text file or a Twitter archive. Several thousand
lines are needed to get decent results, with fewer than 100 or so it
won’t work at all.InstallRunpip install twitter_markov, or download/clone the package and
runpython setup.py install. Feel free to use a virtualenv, if
you’re into that.Setting up a botSee the docsfor a complete
guide to setting up an ebooks bot. Here are the basics:Create a app and authenticate it with your new Twitter accountCreate a
corpus, a
text file with one sentence or text per lineCreate a ``bots.yaml`config
file <http://pythonhosted.org/twitter_markov/config.html>`__Set up a task to tweet and
replyAPISee the docs.LicenseCopyright 2014-2016, Neil Freeman. This software is available under the
GPL 3.0. See LICENSE for more information.
Package: twitternewsbot
twitter-news-botA python API allowing users to:Scrape news articles from Google News.Extract the articles from the news sources.Create and post tweets(or now Xs) usingtweepy.Leverage PaLM to generate summaries from articles as tweets and to generate tweets.Pipeline and automate the scraping and tweeting procedure using acronjob.Quick StartFor complete documentation and examples, please refer to thedocumentation.InstallationpipinstalltwitternewsbotRequirements - before using the APIFor more information on how to generate the following keys and tokens, please refer to thedocumentation.To use thetweepyAPI to post tweets, you must have a Twitter developer account and create an app. You can create an apphere. Don't worry, Twitter gives you 1 free app. Once you have created an app, you will need to generate the following keys and tokens:Consumer API keyConsumer API secret keyAccess tokenAccess token secretTo use PaLM to generate tweets and completely automate the process, you will need to generate a PaLM API. To get this, you will need to sign up for the waitlisthere. You can then generate the API key.These keys must be stored in a.envfile in the root directory of your project. The.envfile should look like this:API_KEY="your-key-here"API_SECRET_KEY="your-key-here"ACCESS_TOKEN="your-key-here"ACCESS_TOKEN_SECRET="your-key-here"GOOGLE_API_KEY="your-key-here"UsageThe API is very simple to use. Here is a quick example:fromtwitter_news_bot.tweeterimportTweeterfromtwitter_news_bot.newsfinderimportNewsFinderfromtwitter_news_bot.twitternewsbotimportTwitterNewsBot# Create a NewsFinder and Tweeter Objectnf=NewsFinder()t=Tweeter()# Create a TwitterNewsBot objecttnb=TwitterNewsBot(nf,t,topic="AI")# Run the TwitterNewsBOt to scrape articles, extract them, summarize them and post them as tweetstnb.run()Future UpdatesAdd support for other summarization models such as OpenAI.Add region based searching for news articles on Google News.
Package: twitter-oauth-ios-django
twitter-oauth-djangoCreate UserSocialAuth of social_django with OAuth login with twitter-kit-ios.Supported python versions3.4, 3.5, 3.6Supported django versions2.0.xInstallation$pipinstalltwitter-oauth-ios-djangoAddtwitter_oauth_iosintoINSTALLED_APPSin yoursettings.pyfileINSTALLED_APPS=[...,'social_django','twitter_oauth_ios',]Addtwitter_oauth_iosrouting inurls.pyfilefromdjango.urlsimportinclude,pathurlpatterns=[...,path('twitter_oauth/',include('twitter_oauth_ios.urls',namespace='twitter_oauth_ios')),]Sample request$curl-XPUThttp://example.com/twitter_oauth/\-H"Content-Type: application/json"\-H"Accept: application/json"\-d\"{
        'user_id': 1111111111,
        'oauth_token': '1111111111-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
        'oauth_token_secret': 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
        'screen_name': 'sample_screen_name',
        'display_name': 'display_name'
     }",Dependence librariesDjangosocial-auth-app-djangoAuthornnsnodnbLICENSECopyright (c) 2018 Yuya Oka Released under the MIT license (seeLICENSE)
Package: twitterpandas
twitter-pandas==============version number: 0.0.1author: Will McGinnisOverview--------A library for getting and interacting with twitter data via pandas.  Currently very in-flux, based heavily on my otherlibrary of this type: [git-pandas](https://github.com/wdm0006/git-pandas).### Current StateThe library itself is based heavily on [tweepy](http://docs.tweepy.org/en/v3.5.0/), and as such the development and APIto twitter-pandas will follow it's API pretty closely.  To start with I've implemented the:* user methods* timeline methods* favorite methods* account methods* trends methods* list methods* saved search methods* status methods* direct message methods* friendship methodsAs well as some helper properties:* api_id* api_screen_nameWhich help access data tied to the API key's account quickly.### RoadmapGoing forward, we will work our way through [tweepy's api](http://docs.tweepy.org/en/v3.5.0/api.html), providingpandas-based interfaces to the methods in each of these groupings that return datasets (for now we are trying to stayread-only where practical, with a data analysis focus).* block methods* help methods* geo methodsThe general idea is to:* Use sensible defaults to make interfaces sensible, intuitive, and safe* Provide raw datasets as pandas dataframes for all common api endpoints that return data* Provide some processed datasets for common analysis tasks:* people who I follow who don't follow me (and vice versa)* top users of a hashtag* top followers of mine* follower growth charts* etc.Any feedback on analysis tasks that you commonly do and could be made simpler with this library would be extremelyvaluable, so please open up an issue with suggestions.Installation / Usage--------------------To install use pip:$ pip install git+https://github.com/wdm0006/twitter-pandas.gitOr clone the repo:$ git clone https://github.com/wdm0006/twitter-pandas.git$ python setup.py installThen let 'er rip:from twitterpandas import TwitterPandas# create a twitter pandas client objecttp = TwitterPandas(TWITTER_OAUTH_TOKEN,TWITTER_OAUTH_SECRET,TWITTER_CONSUMER_KEY,TWITTER_CONSUMER_SECRET)# create a dataframe with 10 of my own followersdf = tp.followers(limit=10)print(df.head())# create a dataframe with my own informationdf = tp.me()print(df)# get a dataframe with the information of user willmcginnisdf = tp.get_user(screen_name='willmcginnis')print(df)# get back 10 users who match the query willmcginnisdf = tp.search_users(query='willmcginnis', limit=10)print(df)Contributing------------We are looking for contributors, so if you are interested, please review our contributor guidelines in CONTRIBUTING.md,which includes some proposed starter issues, or if you have an idea of your own, send us a pull request.Examples--------There are some examples in the examples directory, to run them, you need API credentials.  Add a keys.py file (and makesure it's gitignored) with the format:TWITTER_OAUTH_TOKEN = 'foo'TWITTER_OAUTH_SECRET = 'bar'TWITTER_CONSUMER_KEY = 'baz'TWITTER_CONSUMER_SECRET = 'bat'And the examples should work for you. If you run into any issues, feel free to open an issue and I'll try to help you out.
Package: twitterpeel
twitterpeelis a Twitter frontend API scraper based on Kenneth Reitz’stwitter-scraper. I originally wrote it becausetwitter-scraperwas not
compatible with Python 3.7.FeaturesNo Twitter API authentication necessary.Fast.RequirementsPython 3.6 or higherInstallation$ pip3 install twitterpeelor$ git clone git@github.com:kylepw/twitterpeel.git && cd twitterpeelUsage>>> from twitterpeel import get_tweets
>>>
>>> for t in get_tweets('MISTERMORT', pages=3):
...     print(t['tweetid'], t['text'])
...
1108565146019000321 i wonder if neiman marcus missed me...
1108521311863738369 Today is the day of spring equinox AND a full moon...
1108442303465697281 forgot what i was going to say
...LicenseMIT License
Package: twitter-photos
Twitter Photos is a command-line tool to get photos from Twitter accounts.Requirementspython-twitterrequestsurllib3InstallationYou can install the package with pip:$ pip install twitter-photosOr, you can download a source distribution and install with these commands:$ python setup.py installHow It WorksThe command-line front-end of Twitter Photos, “twphotos”, downloads photos from specified Twitter accounts into individual directories each named after username. It hits the Twitter API as little as possible to retrieve photos links and download each link separately. You can view the links yourself and pipe them to other programs such aswget. You can specifiy photo size, number of photos to get, and whether to download only new photos since last downloads.SetupCreate a config file at ~/.twphotos specifying your Twitter credentials (you can create an app and get your keys atTwitter Application Management):[credentials]
consumer_key = your_consumer_key
consumer_secret = your_consumer_secret
access_token_key = your_access_token_key
access_token_secret = your_access_token_secretNote that the values on the right side of=should not contain the quotes; they are just themselves since this file is in INI format.UsageThe simplest usage is to run “twphotos” from command-line without any options. This will download all photos from the current authenticated user (you):$ twphotosDownload all photos from an existing user other than yourself with-uoption followed by username. “twphotos” will automatically create a directory with the specified username and put downloaded photos in there:$ twphotos -u wiredDownloadnmost recent photos from a user using-nfollowed by number:$ twphotos -u wired -n 20Download photos to a directory other than the current one:$ twphotos -u wired -o /path/to/dirEnable “incremental download” to download new photos since the last downloads with-i:$ twphotos -u wired -iEnable “parallel download” to speedup the downloads using the-rswitch:$ twphotos -u wired -rPrint username, tweet ids, and URLs instead of downloading them with-pswitch:$ twphotos -u wired -pExclude replies tweets using-eswitch:$ twphotos -u wired -eDownload small-sized photos$ twphotos -u wired -s smallYou can retrieve URLs only withcutcommand:$ twphotos -u wired -p | cut -d ' ' -f3Command-line OptionsThe “twphotos” command accepts the following options:-uUSER,--userUSERuser account-lLIST_SLUG,--listLIST_SLUGlist slug with –user as list owner-oOUTDIR,--outdirOUTDIRoutput directory-p,--printprint media urls and tweet ids instead of download-r,--parallelenable parallel download-nNUM,--numNUMnumber of most recent photos to download-i,--incrementdownload only new photos since last download-e,--exclude_repliesexclude replies-sSIZE,--sizeSIZEphoto size (orig,large,medium,smallandthumb)-tTYPE,--typeTYPEtimeline type (userandfavorites)
Package: twitter-scraper-without-api
Twitter scraper seleniumPython's package to scrape Twitter's front-end easily with selenium.Twitter_scraper_without_APIThis code was developed to extract information from twitter without using API as there are a limitation and costs for using official twitter API. You can extract based on your keyword and time frame (in minutes). You can extract unlimitted number of tweets.Pre-requestsPython 3.6+Browsers(Firefox)Instalationyou can install from source code usinggit clone https://github.com/HamedMinaeizaeim/twitter_scraper_without_API.gitand then runPython setup.py installor you can runpip install -r requirements.txtalternatively, you can install usingPyPl:pip install twitter_scraper_without_APIHow to useTo use this library, you just need to import the TwitterScraper scraper class and then specify your keyword search. By default, it will return all tweets within a minute. You can change it to extract tweets in the last n minutes. Here is a code to do that:from src.twitter_scraper_without_api import TwitterScraper
 twitter = TwitterScraper('bitcoin')
 twitter.last_n_mins = 3
 twitter.fetch_data()Export optionYou can export data as json, panda (Dataframe) and csvdf = twitter.store_data('dataFrame')
csv = twitter.store_data('csv')
json = twitter.store_data('json')PrivacyThere is no issue with privacy in this library and search is based on publicly avaialble information
Package: twitter-sdk
TwitterAPI (Python)InstallationThis python package requires python >= 3.6 with pip.Install with pippython3-mpipinstall--upgrade--usertwitter_sdkInstall manualgitclonehttps://github.com/AdriBloober/TwitterSDK&&cdTwitterSDK
python3setup.pyinstallHow to use?Go here (https://developer.twitter.com/en/apps) and create a developer app. Under TabKeys and tokensget you'r tokens.How to get the authentication credentials? (OAuth1.0)fromtwitter.apiimportTwitterApi,TwitterAuthconsumer_key=""consumer_secret=""access_token_key=""access_token_secret=""api=TwitterApi(TwitterAuth.get_oauth1_auth(consumer_key,consumer_secret,access_token_key,access_token_secret))How to get the authentication credentials? (OAuth2-Bearer Token)fromtwitter.apiimportTwitterApi,TwitterAuthbearer_token=""api=TwitterApi(TwitterAuth.get_oauth2_bearer_token(bearer_token))How to get the authentication credentials? (Basic Auth for premium & enterprise)fromtwitter.apiimportTwitterApi,TwitterAuthemail_address=""password=""api=TwitterApi(TwitterAuth.get_basic_authentication(email_address,password))TheTwitterApiobject contains all methods.Rate limitsHere are all rate limits documented:https://developer.twitter.com/en/docs/twitter-api/v1/rate-limits/endpoint-rate-limits.If the rate limit has been reached, the errortwitter.error_management.RateLimitReachedErrorwill been thrown.HTTPErrorsIf the response status code is betweet 400 and 599, thetwitter.error_management.TwitterErrorwill been thrown.importrequestsclassTwitterError(Exception):status_message:strstatus_code:inturl:strresponse:requests.Responsedef__init__(self,status_message,status_code,url,response=None):self.status_message=status_messageself.status_code=status_codeself.url=urlself.response=responsesuper().__init__(f"Error{status_code}:{status_message}for url{url}.")
Package: twittersent
Python Package for Twitter's Sentiment Analysis===============================version number: 0.0.2author: Shekhar JhaOverview--------A python package to analyse the tweets and extract meaning from the data, can be installed with pip.Installing/Setup--------------------To install use pip:$ pip install twittersentOr clone the repo:$ git clone https://github.com/ekchusis/twittersent.git$ python setup.py installGet the tokens/keys by registering at [Twitter Api](https://developer.twitter.com/en/docs/basics/authentication/guides/access-tokens) and fill put the values of the following variables in `client.py` file```pythonconsumer_key = Noneconsumer_secret = Noneaccess_token_key = Noneaccess_token_secret = None```Contributing------------TBDExample-------A simple file that takes a list as an input```pythonfrom client import TwitterSentimport syssys.path.insert(0, '/Users/xanthate/twittersent/twittersent')print("Enter the list of keywords separated by commas: ")user_input_as_string = input()user_input_as_list = user_input_as_string.split(',') #splits the input string on commasuser_input_as_list = [a for a in user_input_as_list]print("Enter the total number of tweets on which the analysis is to be done: ")input_total_number_of_tweets = int(input())T = TwitterSent()value = TwitterSent.calculate_sentiment(T, user_input_as_list, input_total_number_of_tweets)TwitterSent.barplot(T, value)```
Package: twittersentiment
Twitter Sentiment analyzerSentiment analysis is the task of determining the sentiment of a given expression in natural language, It is essentially a multiclass text classification text where the given input text is classified into positive, neutral, or negative sentiment. But the number of classes can vary according to the nature of the training dataset. This project aims to build a sentiment analyzer specifically for twitter domain.Why a Custom model for twitter domain?Simply put, a Tweet is a message sent on Twitter. Most of the tweets do not follow normal English grammar and vocabulary mainly due to the limitation of the number of characters allowed in a tweet. This requires special care to yield better performance, hence this project.Install!pip install twittersentimentExamplesUsing pretrained modelYou can also train your own mode with custom dataset and your choice of word embedding, seeexamples
Package: twitter-sentiment
Python library to Explore Emotions Behind Tweetstwitter-sentiment is a Python library leveraging NLP algorithm and the Twitter API to classify the sentiment of a tweet.InstallationInstalling twitter-sentiment is simple, you just have to use pip.
::pip install twitter-sentimentDocumentationDocumentation is available attwitter-sentiment.readthedocs.iotwitter-sentiment in a nutsheltwitter-sentiment let you classify a tweet/list of tweets as positive (1) or negative (0). twitter-sentiment then calculate and returns the ration of positive tweets. To classify a tweet, twitter-sentiment levereage TextBlob Naive Byaise NLP library. More information can be find attextblob.readthedocs.ioContinuous Integrationtwitter-sentiment uses circleci as a continuous integration tool. Pushing a new git tag to the remote repositiory will trigger circleci workflow and:validate the test in /test/test_twitterSentiment.pycheck for a match between theVERSIONvariable in the setup.py file and the git tag version.
If all tests pass, the build will be automatically upload to the pypi server