this post was submitted on 09 Jun 2023
6 points (100.0% liked)

Game Deals

729 readers
1 users here now

All the best deals for games, discounts, bundles etc. are all welcome!

Community Rules:

founded 1 year ago
MODERATORS
6
Plans - Deal Bot (compuverse.uk)
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

For new subscribers to this community, I plan to write a bot which will automatically find and post deals (likely using the fantastic resource that is https://isthereanydeal.com!)

So hopefully we'll soon have awesome deals being posted here automatically :D

EDIT: The bot is live: /u/gamedealsbot!

At present, this is pulling data from yesthereisadeal.com
I plan to add support for more deal sources in the near future!
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago (4 children)

Any chance you'd publish your bot code? I'd like to do similar with she content relevant to some other interests.

[–] [email protected] 1 points 1 year ago (3 children)

The bot code is SUPER nasty right now, lots of hardcoded URLs and stuff atm.

I plan to generalise it and then I'll likely throw it on my GitHub! https://github.com/CameronRedmore

I'll let you know once it's up there :)

[–] [email protected] 2 points 1 year ago (1 children)

Given the majority of your repo are in Java, I guess your bot is written in Java as well? As a Java guy, I'd love to help! Cheers 👍🏻

[–] [email protected] 2 points 1 year ago (1 children)

Ah, most of my public stuff is indeed in Java, but I haven't made any new projects in Java for quite a while now haha.

Most of my projects have actually been in NodeJS until rather recently.

As my introduction post states, I'm trying to learn Rust at the minute! So the bot is actually written in Rust!

Unfortunately, not knowing a language leads itself to writing terrible, unreadable code that goes against all the conventions haha! Hence the horrendous state the bot is in right now :)

I've temporarily taken the bot down whilst I rewrite it and make it more general and clean. I'm trying to make it more... modular :)

I've just had an idea however, I could implement a system which would enable to bot to run an external command, parse in the output (likely JSON), and then treat it as posts to make, that would enable anyone to write a "provider" in any language they like, the main bot would just call that, and so long as they returned data in the right format, it'd just work.

Something to think about for sure! 🤔

[–] [email protected] 2 points 1 year ago

That might be handy. I can probably cobble together some sort of python scraper for the datasources I'm interested in... but am guessing the lemmy API side to be outside of my capability.

load more comments (1 replies)
load more comments (1 replies)