Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong parsing | missing first image #29

Open
rafapolo opened this issue Oct 25, 2019 · 6 comments
Open

wrong parsing | missing first image #29

rafapolo opened this issue Oct 25, 2019 · 6 comments

Comments

@rafapolo
Copy link

Had to export hundreds of medium posts for a project and realized a wrong pattern in which the first image are not captured by mediumexporter.

to reproduce:

$ mediumexporter https://medium.com/@AreYouSyrious/ays-news-digest-08-02-17-uk-reneges-on-the-dubs-agreement-destroys-hopes-of-refugee-children-97cc0ca96fe0 > output.md

markdown output:

# AYS NEWS DIGEST 08.02.17 — UK reneges on the Dubs Agreement, destroys hopes of refugee children

People camp outdoors in Paris. Photo Credit: Calais Action

### Feature
...

Algorithm misses first image, but not sure how to fix the parser.

@evan-coygo
Copy link

We're also having this issue

@rafapolo
Copy link
Author

rafapolo commented Nov 5, 2019

@xdamman I guess its related to parsing the metadata of the first paragraph... if you can give me some light I could try to do some nodejs to help ;)

@xdamman
Copy link
Owner

xdamman commented Nov 6, 2019

Sorry I haven't been touching this repo in more than a year. I've shifted my attention to the climate emergency 🌍🔥⏳(if other open source developers want to join, please ping me!)

Any chance anyone else can take a look?

@rafapolo
Copy link
Author

To compile the refugees situations are also being an emergency...
I tried, but not comfortable with nodejs or medium outputs to fix it...
medium-2-md & medium-to-markdown alternatives are even more obsolete.

@rafapolo
Copy link
Author

my guess is that the type in the first paragraph is not being correctly parsed.
https://github.com/xdamman/mediumexporter/blob/master/lib/utils.js#L149
line #39 is being, somehow, ignored https://codebeautify.org/jsonviewer/cb88e380

@tvvignesh
Copy link

I am facing the same issue as well. Missing the first image, but all other images come up correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants