dwminer / warthundernewsbot Goto Github PK
View Code? Open in Web Editor NEWA bot that crawls reddit.com/r/warthunder for news submissions and posts comment mirrors.
A bot that crawls reddit.com/r/warthunder for news submissions and posts comment mirrors.
At least one news post so far has caused the bot to exceed the 10,000 character limit, resulting in a failed comment.
Possibly ask mods to add some CSS to do this. (necessary CSS is on private test sub atm)
Post formatting:
#####	
######	
###	
Text
---
>content
>content
---
Frequently (always?) fails to send error reports. Possible misuse of Reddit API?
Gaijin seems to like to use tables to organize information (such as in http://warthunder.com/en/news/522-Storm-over-Belgrade-en). Probably should find and convert these tables to Reddit markdown. (Sometimes the formatting change results in confusing content.)
Use formatting: (important that there aren't multiple carriage returns per newline - strip out extras)
Header | Header
|:-:|:-:|
item|item
item|item
Parentheses in links break formatting with Reddit's markdown scheme. Add a regex to find and escape these characters in links with backslashes.
Eg: http://warthunder.com/upload/image/800px-Fw_190_A-8(1).jpg
should be formatted as [Image](http://warthunder.com/upload/image/800px-Fw_190_A-8\(1\).jpg)
to prevent the link from breaking.
From a management standpoint, it would be nice to log the checked[]
list in a text file so that when the bot needs to be restarted, it can be done without worrying about double-posting comments.
(Perhaps it would be better to simply have an --ignore-existing-posts
command-line option.)
Just pull out the email address from the link and replace it with the unformatted email address.
Right now this bot relies on someone manually posting news submissions: why not automate that as well?
Gaijin seems to like to go back and change the text of the article after posting it. Probably make a dictionary of article ID's, store a hash of the article text and edit the comment if something changes.
Having an image link for every SL icon seems silly - check for this and replace with plain text.
Apparently YT video ID's can have dashes in them...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.