Botometer Pro

FREEMIUM
Door Observatory on Social Media | Bijgewerkt hace 16 días | Social
Populariteit

9.2 / 10

Latency

1,212ms

Serviceniveau

100%

Health Check

N/A

Terug naar alle discussies

BotometerLite

Rapid account: Traciefrost
traciefrost
hace 5 meses

Hello, I have a ULTRA plan and tried to use BotometerLite non-Twitter mode. But I am getting error: HTTPError: 400 Client Error: Bad Request for url: https://botometer-pro.p.rapidapi.com/litev1/check_accounts_in_bulk

The code I used is from https://github.com/IUNetSci/botometer-python

import botometer

rapidapi_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
blt = botometer.BotometerLite(rapidapi_key=rapidapi_key)
tweet_list = [tweet1, tweet2, …]

blt_scores = blt.check_accounts_from_tweets(tweet_list)

Rapid account: Sushmasree 325
sushmasree325 Commented hace 5 meses

@traciefrost
How can I contact you personally

Rapid account: Traciefrost
traciefrost Commented hace 5 meses

Thank you for checking. I tried many times using both Jupyter Notebook and Google collab but still showed the same error message. Is it possible to contact you and see how you do it? I can send you a link of my google collab. Could you please let me know your email address?

Rapid account: O So Me
OSoMe Commented hace 5 meses

I just tested it myself. The API works as expected. Without access to your data / coding environment, I cannot determine the cause of the error. One possible reason is that the payload is in incorrect format.

Rapid account: Traciefrost
traciefrost Commented hace 5 meses

I did subscribe to the ULTRA plan.

I created an app and then copied the API key from that app to “rapidapi_key = “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx””

Please find my error message below. This is the error message I received after running “blt_scores = blt.check_accounts_from_tweets(tweet_test)”. I don’t know how to solve the problem.


HTTPError Traceback (most recent call last)
/var/folders/wc/l13x0hlj2v11tnndkqflyzmh0000gn/T/ipykernel_27948/748413288.py in <module>
1 # Prepare a list of tweets from the users that you want to perform bot detection on.
2 # The list should contain no more than 100 tweets.
----> 3 blt_scores = blt.check_accounts_from_tweets(tweet_test)

~/opt/anaconda3/lib/python3.9/site-packages/botometer/init.py in check_accounts_from_tweets(self, tweets)
284 url = self.bom_api_path(‘check_accounts_in_bulk’)
285 bom_resp = self._bom_post(url, json=tweets)
–> 286 bom_resp.raise_for_status()
287 classification = bom_resp.json()
288

~/opt/anaconda3/lib/python3.9/site-packages/requests/models.py in raise_for_status(self)
958
959 if http_error_msg:
–> 960 raise HTTPError(http_error_msg, response=self)
961
962 def close(self):

HTTPError: 400 Client Error: Bad Request for url: https://botometer-pro.p.rapidapi.com/litev1/check_accounts_in_bulk

Rapid account: O So Me
OSoMe Commented hace 5 meses

Then it should work. Do you have more specific error messages? (The one you provided often appears when you do not have access to the ULTRA plan.)

Rapid account: Traciefrost
traciefrost Commented hace 5 meses

Yes, I had some historical tweets collected from Twitter API before it became unavailable and I converted them into a list following the Github tutorial like this:

tweet_list = [tweet1, tweet2, …]

I tested on 4 tweets but kept getting the error message. I thought the non-Twitter mode does not require a connection to Twitter API. Can I use non-Twitter mode to check accounts for tweets already collected? Thanks.

Rapid account: O So Me
OSoMe Commented hace 5 meses

Are the tweet objects in the tweet_list obtained from the Twitter API v1 (which is no longer available)?

Doe mee aan de discussie - voeg hieronder een opmerking toe

Log in / Schrij u in om nieuwe opmerkingen te plaatsen