Post-Match Thread Creator for Counter-Strike: Global Offensive

in utopian-io •  7 years ago  (edited)

pmtc_csgo.png

Earlier this week I posted about a Post-Match Thread Creator for the game League of Legends. When I shared this on my team's Slack the people in our CSGO team demanded I create something like it for them, so here I am.

For the people that didn't read the previous thread; basically I'm in a group that makes all the post-match threads on Reddit for League of Legends, Counter-Strike: Global Offensive (and Overwatch). We do this manually, which takes a while as you can imagine, so I have created a new Python program that automatically creates part of the CSGO threads for us!

New features

As I mentioned above, this project is about making part of the post-match thread creation on Reddit automatic and lessen the burden on my team. I already implemented this for the League of Legends section of our team, and now I've created a new program that also does this for Counter-Strike: Global Offensive. If you follow CSGO, then you know they have plenty of competitions throughout the year (currently the ELEAGUE Major in Boston is happening). For each match played in those tournaments we create a post-match thread on the relevant subreddit with details about the match. These threads serve as a huge hub of discussion about the competitive matches. To speed up the progress of creating these threads I've created another Python program that takes a URL from HLTV, for example for this match, scrapes it, then outputs text that can be used to create a post-match thread on Reddit!

Our situation before

Like I mentioned earlier, when we create our post-match threads for any game, including CSGO, we have to manually enter everything before and after the game. Then once this is entered, we click on "generate" and it generates the scoreboard that we can copy and paste in our thread. This is very tedious to do and has one big problem that we sometimes encounter. If the person responsible for creating the thread doesn't make it for some reason, then we have to create the entire thread from scratch, which takes a long time (all the while with people complaining that the thread is bad on Reddit). I have made a gif showing part of this process below

manual_entry_csgo.gif

Our situation after

Using my program the manual data entry part can be skipped entirely! Simply running the program with a HLTV match URL as an argument outputs the entire scoreboard of a game that can be used to create part of the thread! I have created a gif showing an example of this below

automatic_entry_csgo.gif

How did I implement this?

I created a new Python program called pmtc_csgo.py that scrapes the given HLTV URL using BeatifulSoup. From this it creates a Team object with all the information needed. I also created a JSON file csgo.json with some information that is needed to show the correct logo on Reddit. Putting all this together it then creates part of the thread by using all this information and outputs it to the terminal as seen above.

Technology

I've used the following to create this program:

  • Python (BeautifulSoup, requests)

Roadmap

In the previous thread I already mentioned what my plans were for the League of Legends part. For Counter-Strike: Global Offensive I have the same plans, so I will repeat them here. In the future I also want to integrate this feature into a website, so people that don't have Python installed can simply go to a webpage and get the same output. It will also be useful for people not part of our team. Sometimes when one of our team members doesn't create a thread, then someone outside of our team will create one that simply says "Team A 1-0 Team B", which doesn't include any useful information at all! With a website that creates the thread for them they won't have an excuse to not create a great thread filled with information. I also want to expand the code so that it creates the entire thread and not just the scoreboard of a game. To see what I mean you can see a full thread here and compare it with the output shown in the gif above. If possible I would also like to create a program that does this for the Overwatch post-match threads as well, but I will have to research this first.

How to contribute?

If you want to contribute to this project you can fork my repository and create a pull request!



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Thanks!

Congratulations @amosbastian! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of comments
Award for the total payout received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Very cool..keep up the great work with this!

Thanks!

Hey @amosbastian I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x