djadmin / medium-cli

Medium for Hackers - :computer: A CLI for Medium Stories.
708 stars 62 forks source link

Doesn't work #25

Open NightMachinery opened 6 years ago

NightMachinery commented 6 years ago
undefined:1
<!DOCTYPE html><html xmlns:cc="http://creativecommons.org/ns#"><head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# medium-com: http://ogp.me/ns/fb/medium-com#"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=contain"><title>Popular on Medium – Medium</title><link rel="canonical" href="https://medium.com/topic/popular"><link id="feedLink" rel="alternate" type="application/rss+xml" title="RSS" href="https://medium.com/feed/topic/popular"><meta name="title" content="Popular on Medium – Medium"><meta name="referrer" content="unsafe-url"><meta name="description" content="Popular on Medium on Medium: What’s trending on Medium right now."><meta name="theme-color" content="#000000"><meta property="og:title" content="Popular on Medium – Medium"><meta property="og:url" content="https://medium.com/topic/popular"><meta property="og:image" content="https://cdn-images-1.medium.com/max/1200/1*

SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at Request._callback (/usr/local/lib/node_modules/mediumcli/lib/post.js:28:20)
    at Request.self.callback (/usr/local/lib/node_modules/mediumcli/node_modules/request/request.js:186:22)
    at Request.emit (events.js:180:13)
    at Request.<anonymous> (/usr/local/lib/node_modules/mediumcli/node_modules/request/request.js:1163:10)
    at Request.emit (events.js:180:13)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/mediumcli/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:272:13)
    at IncomingMessage.emit (events.js:185:15)
    at endReadableNT (_stream_readable.js:1106:12)
    at process._tickCallback (internal/process/next_tick.js:114:19)
agarrharr commented 6 years ago

I get the same thing when I run medium top, but it works when I run medium tag cats.

haakonstorm commented 3 years ago

medium top fails, medium tag commandline fails, medium tag cats appears to work but Unhandled rejection TypeError: Cannot read property 'call' of undefined when trying to read.

It's been two years, shouldn't @djadmin consider looking at this? :-P :-)

SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at Request._callback (/usr/local/lib/node_modules/mediumcli/lib/post.js:28:20)
    at Request.self.callback (/usr/local/lib/node_modules/mediumcli/node_modules/request/request.js:185:22)
    at Request.emit (events.js:315:20)
    at Request.<anonymous> (/usr/local/lib/node_modules/mediumcli/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:315:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/mediumcli/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:421:28)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
dkp1903 commented 3 years ago

It's Feb 2021 - getting the same error. Anyone figure out what/why?

haakonstorm commented 3 years ago

"Unexpected token" –– perhaps the response from the Medium "API" has changed and the medium-cli parser unfortunately hasn't been updated. Have you checked to see if any of the forks have?