Trading Strategies with News and Tweets - Section 7, Unit 10 - Botometer / RapidAPI key

After starting the python kernel for the box "Check for the bot" there is always an error like this:

 
---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)
<ipython-input-8-27709812b4a0> in <module>
----> 1 bot_score = botometer.check_account('@realDonaldTrump')

/opt/conda/envs/py361/lib/python3.6/site-packages/botometer/init.py in check_account(self, user, full_user_object)
130 url = self.bom_api_path('check_account')
131 bom_resp = self._bom_post(url, json=payload)
–> 132 bom_resp.raise_for_status()
133 classification = bom_resp.json()
134

/opt/conda/envs/py361/lib/python3.6/site-packages/requests/models.py in raise_for_status(self)
939
940 if http_error_msg:
–> 941 raise HTTPError(http_error_msg, response=self)
942
943 def close(self):

HTTPError: 403 Client Error: Forbidden for url: https://botometer-pro.p.rapidapi.com/2/check_account

How to get this working with Botometer? I also used my Rapid API key but it wasn't also working.

Thank you for your help.

We have updated the "Identify the Bot accounts" notebook in the course. You can download the latest file from the last section "Python Data and Codes".



There are some changes in the Botometer API due to which you are facing the error. To avoid that, you can try updating the botometer package to the latest version (1.6). Also, to get the Botomter API, follow the new guidelines covered in Section 7 Unit 2 "Get Botometer Api Key - Guide".