1
0
Fork 0
miniflux/reader/scraper
Jouni K. Seppänen bb0d2bf675 Add Youtube videos in Quanta articles
Some articles (especially the recent year-in-review ones) include a Youtube
video. The server-side rendered articles do not include the Youtube iframe,
but they do have a script that looks like

    <script type="text/javascript" data-reactid="6">
      window.__APOLLO_STATE__ = {
        ...
          youtube_id: "9uASADiYe_8",

We add a reformatting function that tries to detect obvious JavaScript code
that has a field or variable called youtube_id that has an 11-character
double-quoted value, and adds the referenced Youtube videos in the beginning of
the article. This is slightly more general than needed for Quanta, in the hope
that it could be useful for similar sites.
2022-01-03 10:10:13 -08:00
..
testdata Return outer HTML when scraping elements 2019-12-21 21:18:31 -08:00
doc.go Add missing package descriptions for GoDoc 2018-10-08 17:32:17 -07:00
rules.go Add Youtube videos in Quanta articles 2022-01-03 10:10:13 -08:00
scraper.go add proxy arg in scraper.Fetch 2021-08-28 21:57:11 -07:00
scraper_test.go Remove deprecated io/ioutil package 2021-02-16 21:25:21 -08:00