generated from fregante/browser-extension-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Has anyone looked at how to extract timestamps from t.me? I thought it would be trivial as the time is very obvious:
<a class="tgme_widget_message_date" href="https://t.me/URL">
<time datetime="2026-01-15T18:03:17+00:00" class="datetime">Jan 15 at 13:03</time>
</a>But it turns out the full content of the message is actually in an iframe:
<iframe id="telegram-post-VahidOnline-69929" src="https://t.me/URL?embed=1&mode=tme" width="100%" height="" frameborder="0" scrolling="no" style="overflow: hidden; color-scheme: light dark; border: none; min-width: 320px; height: 818px;"></iframe>I am not sure if we can attach to an element in the iframe with the current fixer., I tried something like this, it gets the timestamp but doesn't show anything:
const fixer = new Fixer('Telegram', [
{
name: 'Post Timestamps',
selector: 'iframe',
attachTo: node => node.contentWindow.document.body.querySelectorAll('a.tgme_widget_message_date')[0],
timestamp: node => node.contentWindow.document.body.querySelectorAll('a.tgme_widget_message_date')[0].firstChild.getAttribute('datetime'),
url: node => node.contentWindow.document.body.querySelectorAll('a.tgme_widget_message_date')[0].href,
},
]);Has anyone looked into this?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels