New site: https://unavatar.io/kikobeats
https://unavatar.io/kikobeats https://unavatar.io/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"
}
In my browser, I'm getting 200 response codes for both cases (missing and found). Can you check on that?
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.
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.
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
OK. I definitely see your point. Since this endpoint is unreliable, let's not add it to the project. Agreed?
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
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?
Sure.