WhatsMyName icon indicating copy to clipboard operation
WhatsMyName copied to clipboard

New site: https://unavatar.io/kikobeats

Open WebBreacher opened this issue 2 years ago • 9 comments

https://unavatar.io/kikobeats https://unavatar.io/webbreacher

WebBreacher avatar Nov 25 '23 17:11 WebBreacher

There is my proposal for unavatar.io

{
      "name" : "unavatar.io",
      "uri_check" : "https://unavatar.io/{account}?fallback=false&json=true",
      "uri_pretty" : "https://unavatar.io/{account}",
      "e_code" : 200,
      "e_string" : "url",
      "m_string" : "",
      "m_code" : 404,
      "known" : ["webbreacher", "kikobeats"],
      "cat" : "images"
}

grabowskiadrian avatar Dec 05 '23 21:12 grabowskiadrian

In my browser, I'm getting 200 response codes for both cases (missing and found). Can you check on that?

WebBreacher avatar Dec 05 '23 22:12 WebBreacher

hmm.. my bad, I was getting 404 just yesterday. Strange situation. I hope you received the tiktok image for the incorrect user.

This is an bug in the unavatar. In this provider code: https://github.com/microlinkhq/unavatar/blob/master/src/providers/tiktok.js

The code sends a request to tiktok and looks for $('meta[property="og:image"]').attr('content').

This meta tag is always in the response even if the user is not found.


At this point it is probably not possible to detect an unfound user. I don't think it's wise to check if there is a tiktok in the reply... for 404.

grabowskiadrian avatar Dec 06 '23 14:12 grabowskiadrian

How about if we used the URL https://unavatar.io/{account}?fallback=http://nonefound.example.com&json=true then we set the m_string to http://nonefound.example.com and the e_string to https:// or https://images.weserv.nl.

This seems to work. both codes would be 200. I've tested in curl on cli and in browser.

image

WebBreacher avatar Dec 07 '23 22:12 WebBreacher

Check this case. User not exist and unavatar returns tiktok image.

username: invalid_user_im_sure

https://unavatar.io/invalid_user_im_sure?fallback=http://nonefound.example.com&json=true

Response:
{
"url": "https://images.weserv.nl/?url=https%3A%2F%2Flf16-tiktok-web.ttwstatic.com%2Fobj%2Ftiktok-web-common-sg%2Fmtact%2Fstatic%2Fimages%2Fshare_img.png&default=https%3A%2F%2Flf16-tiktok-web.ttwstatic.com%2Fobj%2Ftiktok-web-common-sg%2Fmtact%2Fstatic%2Fimages%2Fshare_img.png&l=9&af=&il=&n=-1&w=400&ttl=365d"
}

but @invalid_user_im_sure not exist on tiktok https://www.tiktok.com/@invalid_user_im_sure

grabowskiadrian avatar Dec 07 '23 22:12 grabowskiadrian

OK. I definitely see your point. Since this endpoint is unreliable, let's not add it to the project. Agreed?

WebBreacher avatar Dec 07 '23 22:12 WebBreacher

I created issue on Unavatar repository about this bug: https://github.com/microlinkhq/unavatar/issues/293

Maybe when the problem is solved we will try to do it again

grabowskiadrian avatar Dec 07 '23 22:12 grabowskiadrian

ok. let's close this issue and maybe cross reference the issue you made over there here so that once it is fixed, we can revisit adding it to WMN?

WebBreacher avatar Dec 07 '23 22:12 WebBreacher

Sure.

grabowskiadrian avatar Dec 07 '23 22:12 grabowskiadrian