Quote:
Originally Posted by nickredding
I don’t do calibre recipe development anymore, but for anyone who is interested the following works for the Economist weekly edition.
First, load https://www.economist.com/weeklyedition/archive
Pick out the anchor tags with href in the form /weeklyedition/yyyy-mm-dd
The anchor tags are in reverse-chronological order so the first one is the current edition, and subsequent tags are prior editions.
Now load https://www.economist.com/weeklyedition/yyyy-mm-dd. where yyyy-mm-dd is the edition date you want.
Now pick out the JSON object you can find inside <script id=“__NEXT DATA__”>, call this json (after decoding)
You can parse the edition contents by looking at json.props.pageProps.content.sections.articles
For all of these load (as well as articles) use user agent
Mozilla/5.0 (Linux; Android 14) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.103 Mobile Safari/537.36 Lamarr
|
Fixing the parsing of the index page is trivial, the problem is the eco no longer returns content on the actual article pages. Ideally for logged in users it would return content, but in some brief testing I did, I couldnt get it to work, have to look at it in more detail later.
You can see that only partial articles are available even in the wayback machine:
https://web.archive.org/web/20250620...israel-war-end