mvan231 / Scriptable

MIT License
115 stars 39 forks source link

Not able to check users with an underscore #19

Closed erickosanchezj closed 2 years ago

erickosanchezj commented 2 years ago

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 commented 2 years ago

Is this for the Twitter widget? Or something else?

erickosanchezj commented 2 years ago

Is this for the Twitter widget? Or something else?

Yes, on the Twitter widget

mvan231 commented 2 years 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 commented 2 years 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 commented 2 years ago

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

erickosanchezj commented 2 years ago

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

mvan231 commented 2 years 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 commented 2 years 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