Skip to content
Advertisement

Error ‘Unexpected HTTP code on the target page’, ‘status_code’: 403 when I try to request a json url with a proxy api

I’m trying to scrap this website https://triller.co/ , so I want to get information from profile pages like this https://triller.co/@warnermusicarg , what I do is trying to request the json url that contains the information, in this case it’s https://social.triller.co/v1.5/api/users/by_username/warnermusicarg When I use requests.get() it works normally and I can retrieve all the information.

JavaScript

The problem arises when I try to use an API proxy providers as Webscraping.ai, ScrapingBee, etc

JavaScript

This gives me this error

JavaScript

What I tried to do is: 1- I searched for the meaning of 403 code in the documentation of my API proxy provider, it said that api_key is wrong, but I’m 100% sure it’s correct, Also, I changed to another API proxy provider but the same issue, Also, I had the same issue with twitter.com And I don’t know what to do?

Advertisement

Answer

I don’t know exactly what caused this error but I tried using their webscraping_ai.ApiClient() instance as in here and it worked,

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement