You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we try too parse let say a medium post is not showing the gist code, I believe that this is because the iframes are not loaded instantly and you need to navigate thought the site to the browser to render them. One solution for this could be detecting every iframe on the site and scroll to each of them so they load.
also checking the parser itself for the gist code for example in the case of the url above the iframe of some of the gist will be https://edoconti.medium.com/media/f10f007fac2ec7a4c0662ac12428a7fe
Resources on this page are lazy-loaded. Also, the gist iframes use table for layout, so it cannot be transformed into a code block or to a typical markdown table.
We have introduced a script injection mechanism to our API.
Also inside the page, we provide these utility functions/event:
- waitForSelector(selector: string): Promise<HTMLElement>
waits for the selector to appear in the DOM
- simulateScroll(): void
simulates scrolling to the bottom of the page to trigger lazyload elements
- "mutationIdle" event on document
fires when the DOM mutation is idle in 200ms
For the gist formatting, we introduced a x-with-iframe: quoted parameter to inject iframe contents as blockquote sections.
If we try too parse let say a medium post is not showing the gist code, I believe that this is because the iframes are not loaded instantly and you need to navigate thought the site to the browser to render them. One solution for this could be detecting every iframe on the site and scroll to each of them so they load.
also checking the parser itself for the gist code for example in the case of the url above the iframe of some of the gist will be
https://edoconti.medium.com/media/f10f007fac2ec7a4c0662ac12428a7fe
it parses incorrectly and return the
html tagsThe text was updated successfully, but these errors were encountered: