Not able to check users with an underscore

8
closed
erickosanchezj
erickosanchezj
Posted 3 months ago

Not able to check users with an underscore #19

When trying to set the widget with a user that has an underscore, there's an error: 2022-01-20 09:44:59: Error on line 151:25: TypeError: undefined is not an object (evaluating 'json[0].user')

Where line 151 has url of username set to anything that has an underscore: url = 'CNAC_GN' //'ps5uknews'

mvan231
mvan231
Created 3 months ago

Is this for the Twitter widget? Or something else?

erickosanchezj
erickosanchezj
Created 3 months ago

Is this for the Twitter widget? Or something else?

Yes, on the Twitter widget

mvan231
mvan231
Created 3 months ago

Thanks for letting me know. I have tried multiple other Twitter accounts and they work fine with underscore at the beginning, middle, and end of the user handle. Something strange specific to this account is causing the issue. Do you see it on other accounts too?

erickosanchezj
erickosanchezj
Created 3 months ago

Thanks for letting me know. I have tried multiple other Twitter accounts and they work fine with underscore at the beginning, middle, and end of the user handle. Something strange specific to this account is causing the issue. Do you see it on other accounts too?

So far, that's the only one I've found with that issue, strangely enough, that's the only one I want to check lol

mvan231
mvan231
Created 3 months ago

I understand the issue. It's weird because the Twitter API responds with no data for that account. It's very strange

erickosanchezj
erickosanchezj
Created 3 months ago

I've tried to escape the underscore with a few other characters but it just won't work

mvan231
mvan231
Created 3 months ago

You are inputting it correctly, it's an issue with the account itself it seems. It's strange, because it's not a private account, so it should work

mvan231
mvan231
Created 3 months ago

Understand what you mean. I think something strange with that account info is the issue. It might be possible to use the old method for building this widget (via webscraping) instead of the API