comicsrss.com icon indicating copy to clipboard operation
comicsrss.com copied to clipboard

keep minimum strip count

Open cfinck27 opened this issue 9 months ago • 2 comments

Potential fix for #153

Since these are all old strips that aren't being updated, they are never more recent than expirationDate, which means only the first strip is kept:

.filter((strip, i) => (i === 0 || new Date(strip.date) > expirationDate)) // keeps recent strips

To mitigate this I added a minimumCount variable that applies globally, but this could also be moved to a per-scraper value.

Not sure what the other options are since these aren't being updated, but if there's still a desire to see some in the feed then this is probably the best compromise.


https://github.com/ArtskydJ/comicsrss.com/blob/8aecc970c5f7834d353f187b1068cb50a4223dbb/_generator/bin.js#L128-L134

cfinck27 avatar Jun 22 '25 01:06 cfinck27

Thanks for the PR!

I think the root cause of #153 is something else. IIRC gocomics messed with URLs and I wasn't handling them right? Maybe still am not?

I don't recall why I forced it to keep at least one comic strip, so I don't know whether or not I want to bump that number up.

ArtskydJ avatar Jun 24 '25 18:06 ArtskydJ

Sure thing, wasn't sure if that was the desired behavior anyways. FWIW I did test it and it saved off 10 entries instead of 1 after running.

cfinck27 avatar Jun 24 '25 19:06 cfinck27