15 February 1988
15 February 1988
Testing automated posting. Sorry for any bugs :D
15 February 1988
Testing automated posting. Sorry for any bugs :D
You're viewing a single thread.
@m_f@lemm.ee noticed you're the new mod. Just got a minimum viable bot to continue the daily posting done.
Neat! You should definitely post then, it's better if I'm not the single-point-of-failure for comics posting. I'll post my still-somewhat-wip script for posting the Peanuts comic, which uses GoComic and probably has a lot of overlap with C&H.
I run python post_stuff.py
, which imports other scripts for each comic and runs them. get_lemmy.py
handles caching auth credentials for up to several days (I'm sure it could go longer but I haven't checked the docs yet). Caching the creds and running it all from a wrapper entry point keeps the number of logins down, which I was getting rate limited on. It doesn't currently handle accounts with MFA enabled, but it should be pretty resilient to stuff like file upload failing.
You can just ignore the image munging bits and probably some other bits, that was for turning the 1x4 Peanuts strip into a 2x2 post here. You might find interesting stuff by poking around on the site, Peanuts has a transcript for each comic in the HTML, though I don't see that for C&H.
I've also been meaning to publish the git repo somewhere, hopefully this will motivate me to get around to doing that.
cc @db0@lemmy.dbzer0.com on ☝️btw, pythorhead
has been super useful! You might be interested in the use case of handling creds like I do there, maybe that's something the library could do?
This all is over my head. I will continue to post bloomcounty manually for now. Plus I personally dislike when I see a bot posting.
If you get tired of it, get in touch. I won't mind adding Bloom County as one the communities @dailycomic@sh.itjust.works posts to.
People don't seem to mind with CnH. Often bots are introduced to do something without anyone asking, but with stuff like this it's pretty clear that it's content people like, and which they want to continue seeing. Just the first post from the bot account got a comment about it, and it was just someone saying "oh, this makes sense".
Mine's just 54 lines right now. Executed daily as a cron job. Wrote in some simple checks that enable it to account for leap days, or being behind. It can be made to catch up simply by having it run more than once a day.
I should make it cache the login, too.
It can be made to post any comic on gocomics, daily, in sync, simply by editing a config toml.