WelcomeUser Guide
ToSPrivacyCanary
DonateBugsLicense

©2025 Poal.co

207

In the name of Allah the all-merciful,

how does your site pick the thumbnails of videos and news articles? I'd like to adapt my own sites in such a manner, that linking to them also displays a thumbnail instead of the standard-icon.

Praised be the prophet and the holy jihad.

P.S. I should stop letting my dune audio-book play while I sleep, as it appears to indoctrinate me, peace be upon you.

In the name of Allah the all-merciful, how does your site pick the thumbnails of videos and news articles? I'd like to adapt my own sites in such a manner, that linking to them also displays a thumbnail instead of the standard-icon. Praised be the prophet and the holy jihad. P.S. I should stop letting my dune audio-book play while I sleep, as it appears to indoctrinate me, peace be upon you.

(post is archived)

[–] 1 pt (edited )

Shalom!

We're using python's Beautifulsoup, lxml and Pillow to create an image thumbnail.

You can get Throat's code there and study it:

https://poal.co/license

Check "get_thumbnail(link)" function in misc.py file.

[–] 0 pt

I believe, that you've posted the wrong link. That's a license.

[–] 1 pt

There's a link at the bottom.

[–] 0 pt

img = urljoin(link, og('meta', {'property': 'og:image'})[0].get('content'))

Very nice, may allah bless you ;)