Giter Club home page Giter Club logo

Comments (17)

Kikobeats avatar Kikobeats commented on June 18, 2024 1

why not you just query against https://unavatar.io domain?

CleanShot 2021-07-19 at 16 50 29@2x

from unavatar.

Kikobeats avatar Kikobeats commented on June 18, 2024

Hello, and thanks for reporting!

The issue was happening because of an extra validation to be sure the logo detected over the site has a square resolution.

After implemented that validation at microlinkhq/metascraper#430, I tested your links, and now they working as expected.

If you are only interested into resolve domains, adding the prefix /microlink will skip getting an avatar from the social networks, speeding up the response time.

https://unavatar.io/microlink/qz.com
https://unavatar.io/microlink/mail.bloombergbusiness.com

from unavatar.

pdugan20 avatar pdugan20 commented on June 18, 2024

Thanks so much for the quick resolution!

from unavatar.

pdugan20 avatar pdugan20 commented on June 18, 2024

Hmm the Bloomberg link is still showing as a generic smiley face. Maybe a caching issue on my end?

from unavatar.

Kikobeats avatar Kikobeats commented on June 18, 2024
curl mail.bloombergbusiness.com
curl: (6) Could not resolve host: mail.bloombergbusiness.com

maybe you want to query to bloombergbusiness.com instead?

from unavatar.

pdugan20 avatar pdugan20 commented on June 18, 2024

Hello! It looks like this issue is happening again?

Examples:
https://unavatar.io/qz.com
https://unavatar.io/politico.com

Any ideas? I believe these were all working at one point.

from unavatar.

Kikobeats avatar Kikobeats commented on June 18, 2024

That's strange, let me take a look

from unavatar.

Kikobeats avatar Kikobeats commented on June 18, 2024

Found the bug, working in a fix

from unavatar.

pdugan20 avatar pdugan20 commented on June 18, 2024

Really appreciate it!

from unavatar.

Kikobeats avatar Kikobeats commented on June 18, 2024

Working back!

CleanShot 2021-07-18 at 00 54 16@2x

I noted https://unavatar.io/politico.com is returning HTML content in an arbitrary way:

curl https://unavatar.io/politico.com
<figure class="art ">
    <div class="fig-graphic">
        <img src="https://static.politico.com/dims4/default/24d02f9/2147483647/resize/1160x%3E/quality/90/?url=https%3A%2F%2Fstatic.politico.com%2Fb8%2Fb0%2F16745e704246beaaafc23cb38f86%2Fapple-touch-icon-144x144-precomposed.png" alt="politico favicon" title="politico favicon"></div>
    </figure>

The URL detected returning the HTML content is https://www.politico.com/android-chrome-192x192.png:

curl https://www.politico.com/android-chrome-192x192.png
<figure class="art ">
    <div class="fig-graphic">
        <img src="https://static.politico.com/dims4/default/24d02f9/2147483647/resize/1160x%3E/quality/90/?url=https%3A%2F%2Fstatic.politico.com%2Fb8%2Fb0%2F16745e704246beaaafc23cb38f86%2Fapple-touch-icon-144x144-precomposed.png" alt="politico favicon" title="politico favicon"></div>
    </figure>

Unfortunately, I can't do too much there :(

Please, tell me if you experiment more corner cases like this 🙏

from unavatar.

pdugan20 avatar pdugan20 commented on June 18, 2024

Thanks for being on top of this!

from unavatar.

pdugan20 avatar pdugan20 commented on June 18, 2024

Hate to keep bothering you but it looks like this is broken again? qz.com which was working with your example about now doesn't return an image:
https://unavatar.io/qz.com

from unavatar.

Kikobeats avatar Kikobeats commented on June 18, 2024

hum we need to find a better way to debug this kind of issue.

The link si working fine to some. What are you experience? Can you attach a screenshot and an HTTP status report?

from unavatar.

pdugan20 avatar pdugan20 commented on June 18, 2024

I get the following:

curl https://unavatar.now.sh/qz.com
Redirecting to https://unavatar.vercel.app/qz.com (308)

...and the redirect just the generic mac smiley face. This url was working in the example you shared about two days ago.

from unavatar.

pdugan20 avatar pdugan20 commented on June 18, 2024

Going directly to the URL also gives me the same placeholder
Screen Shot 2021-07-19 at 7 53 50 AM

from unavatar.

Kikobeats avatar Kikobeats commented on June 18, 2024

Can you perform the following command and paste the output?

curl -I -s -X GET https://unavatar.io/qz.com

from unavatar.

pdugan20 avatar pdugan20 commented on June 18, 2024

Yup!

curl -I -s -X GET https://unavatar.io/qz.com
HTTP/2 200 
date: Mon, 19 Jul 2021 16:07:26 GMT
content-type: image/png
content-length: 3483
content-disposition: inline; filename=image.png
x-permitted-cross-domain-policies: none
access-control-allow-origin: *
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=YaKUNIhSbLRt7jNhKo6U7kmwi9CczLaqJqG%2BZ1XTQPjJkYiYYjytR0y6N3R6Vkbl2vUMCZ6I2KJ7r%2FI3YdtU1e%2B2vyJKAKst1PuJEy8UYw16u4LWyolYJcHjPrK8uOw6K3Ha"}],"group":"cf-nel","max_age":604800}
referrer-policy: no-referrer
x-cache-status: MISS
alt-svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400
etag: "85-v2k3h23t0BTnk590Mk9xGUaH4rU"
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
cache-control: public, max-age=31536000
x-images-api: 5
x-download-options: noopen
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-xss-protection: 0
vary: Accept-Encoding
expires: Sat, 16 Jul 2022 14:05:49 GMT
x-frame-options: SAMEORIGIN
content-security-policy: default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self' https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests
x-content-type-options: nosniff
nel: {"report_to":"cf-nel","max_age":604800}
x-cache-expired-at: 1d
age: 177738
x-dns-prefetch-control: off
cf-bgj: h2pri,csam-hash
x-vercel-cache: MISS
x-vercel-id: pdx1::sfo1::8jk8m-1626533099927-55f6272a28f0
cf-cache-status: HIT
accept-ranges: bytes
server: cloudflare
cf-ray: 671533e70ebb08db-SEA

from unavatar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.