matthewmueller / x-ray

The next web scraper. See through the <html> noise.
MIT License
5.87k stars 349 forks source link

Fix array stream to account for empty arrays #337

Closed leonardodino closed 5 years ago

leonardodino commented 5 years ago

Description

Revised the stream_array function to account for empty arrays as data inputs. I reverted to adding commas before the item, so I can check if the comma is actually needed.

It was generating invalid JSON.

closes #336

Checklist

PixelsCommander commented 5 years ago

@matthewmueller Could you merge this? Looks safe and error it fices is pretty much reproducible...

leonardodino commented 5 years ago

@PixelsCommander, @lathropd seems to be the current maintainer. maybe he can take a look later (:

If you need it right now, I have it published with my PRs here merged: @leonardodino/x-ray

PixelsCommander commented 5 years ago

Thanks @leonardodino , saved me quite some time

lathropd commented 5 years ago

I'm traveling, but will push a new version with this as soon as I can. On Jul 5, 2019, 5:46 AM -0700, Denis Radin notifications@github.com, wrote:

Thanks @leonardodino , saved me quite some time — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.