xdamman / mediumexporter

Export your stories published on medium.com to markdown for easy import
MIT License
233 stars 32 forks source link

No longer works on some medium URLs #60

Open AdaRoseCannon opened 3 years ago

AdaRoseCannon commented 3 years ago

It seems medium is prefacing some responses with HTML even when JSON is loaded. Here is the error I am getting in my console. Here is the URL I am testing it on: https://medium.com/samsung-internet-dev/making-an-ar-game-with-aframe-529e03ae90cb

SyntaxError: Unexpected token < in JSON at position 1539

    at JSON.parse (<anonymous>)

    at Request._callback (/rbd/pnpm-volume/3fedbde6-784a-4417-9672-afa42ea3708b/node_modules/.registry.npmjs.org/medium-to-md/1.1.3/node_modules/medium-to-md/utils.js:13:27)

    at Request.self.callback (/rbd/pnpm-volume/3fedbde6-784a-4417-9672-afa42ea3708b/node_modules/.registry.npmjs.org/request/2.88.2/node_modules/request/request.js:185:22)

    at Request.emit (events.js:180:13)

    at Request.<anonymous> (/rbd/pnpm-volume/3fedbde6-784a-4417-9672-afa42ea3708b/node_modules/.registry.npmjs.org/request/2.88.2/node_modules/request/request.js:1154:10)

    at Request.emit (events.js:180:13)

    at IncomingMessage.<anonymous> (/rbd/pnpm-volume/3fedbde6-784a-4417-9672-afa42ea3708b/node_modules/.registry.npmjs.org/request/2.88.2/node_modules/request/request.js:1076:12)

    at Object.onceWrapper (events.js:272:13)

    at IncomingMessage.emit (events.js:185:15)

    at endReadableNT (_stream_readable.js:1106:12)
purnasatria commented 3 years ago

try using this https://medium.com/@adarose/making-an-ar-game-with-aframe-529e03ae90cb

joel-g commented 2 years ago

try using this https://medium.com/@adarose/making-an-ar-game-with-aframe-529e03ae90cb

Thanks a ton, changing my url from username.medium.com/article to medium.com/@username/article fixed this problem for me

yourcasualdev commented 1 year ago

I'm having the same issue with https://medium.com/@ibrahimbabal/make-your-terminal-look-awesome-5ec507ba7cf9

reteps commented 1 year ago

Me as well. It appears to no longer return JSON formatted data. E.g. https://medium.com/@ibrahimbabal/make-your-terminal-look-awesome-5ec507ba7cf9?format=json does not work.