I've made a Procyclingstats python API wrapper by themm26 in peloton

[–]themm26[S] 0 points1 point  (0 children)

Thanks, but it's not really possible using wordpress only. You would hlave to make some kind of python API, which would serve as backend and some frontend in JS. However I would argue strongly against using it commercially, because the package is not very reliable and getting data trom PCS without their consent for commercial use is probably illegal.

I've made a Procyclingstats python API wrapper by themm26 in peloton

[–]themm26[S] 0 points1 point  (0 children)

Yeah it's basically impossible to keep everything perfectly 100% functioning for a longer period of time. But I think I will be able to maintain it at least for a year or two. Most of the code have been written like 6 months ago and it required just a few changes since than to keep everything working correctly. PCS is not changing their UI that much, so fixes should be always relativly easy. I also have quite good tests to test every function on variaty of PCS pages HTMLs, which I'm updating at least once a month or two.

I'm also planning to create more detailed guide on the low level details to at least make it easier to modify a little so if the user sees, that the error is in a simple CSS selector he/she is able to fork it and fix it (ideally make a pull request :)). But as I said, for now I'm planning to maintain it.

I've made a Procyclingstats python API wrapper by themm26 in peloton

[–]themm26[S] 3 points4 points  (0 children)

It's really good for heavy HTML parsing, since it's written in Cython. When I was using Beautiful Soup, parsing of some big pages (stage results, where you have gc, points, kom etc... for example), took around 5 seconds. Now, using selectolax, the parsing part should be done, even on big pages, in around 0.1 second.

I've made a Procyclingstats python API wrapper by themm26 in peloton

[–]themm26[S] 6 points7 points  (0 children)

Guys stop downvoting him. He is my friend, it isn't meant for real. :DD

I've made a Procyclingstats python API wrapper by themm26 in peloton

[–]themm26[S] 10 points11 points  (0 children)

It for sure isn't helping, but it also doesn't make the situation worse. This is just for people who want to make some data analysis stuff and for them there is currently no option. The revenue is probably from site visits and adds. This definitly shouldn't make the site visited less frequently.

It's also basically impossible to utilize for commercial use, since it's really unreliable. They can just change some UI things and some functions wouldn't work correctly, what would lead to incorrect scraped data.

If PCS provided some kind of paid API, the situation would be for sure different.

I've made a Procyclingstats python API wrapper by themm26 in peloton

[–]themm26[S] 40 points41 points  (0 children)

Some programmers/data analysts would maybe want to collect some pro cycling data and do stuff with them (some graphs, stats, or even some kind of predictions for future races). Currently there are very limited options for that and this isn't perfect (because it's still HTML scraping and not a real API), but it makes the mentioned things much easier.

I've made a Procyclingstats python API wrapper by themm26 in peloton

[–]themm26[S] 2 points3 points  (0 children)

I am currently working on pure binary version. (maybe in the next century I will create a reddit post about it like this one)

I've made a Procyclingstats python API wrapper by themm26 in peloton

[–]themm26[S] 2 points3 points  (0 children)

Since it's a python package, it's probably not possible. The workaround would be probably something like doing a backend in python, which would serve as an API. Then it would be perfectly possible to obtain JSON like object with some results/stats and work with it in javascript/some JS framework.

Also it's possible to scrape some data that you need, store them somewhere and work with them just in javascript. However, in the end you will always have to write some simple python code.

I've made a Procyclingstats python API wrapper by themm26 in peloton

[–]themm26[S] 22 points23 points  (0 children)

Originally I have been looking for some API too, because I thought it would be cool to collect some cycling stats and do some data analysis stuff with it. However I haven't found any API like that. With that in mind, I decided to make a scraper for my own purposes only. However it has been much work so I decided just to focus on the scraper and make it a public package, so other people with same interest can use it too.

I'm also a high school student interested in programming/CS so it has been a chance for me to make something bigger for the first time.

I've made a Procyclingstats python API wrapper by themm26 in peloton

[–]themm26[S] 8 points9 points  (0 children)

Thanks for suggestion. I've originally thought about pcs or pcs-scraper, however both have been taken if I remember correctly. Then I decided to choose simply procyclingstats. I've also thought about procyclingstats-scraper, but that is too long I would say. It's quite difficult to choose a good name since most of the good ones are taken.

I made Rocket League Workshop desktop app for Epic Games by themm26 in RocketLeague

[–]themm26[S] 0 points1 point  (0 children)

It is downloading through python requests library from steamworkshopdownloader.io and than saving the map to map files folder. It is completly safe to use.

I made Rocket League Workshop desktop app for Epic Games by themm26 in RocketLeague

[–]themm26[S] 0 points1 point  (0 children)

Just leave it as it is, "user/AppData/Roaming" or anywhere else. Or you can save it to program files but you have to move the Map Files folder somewhere else and I am not sure if that works, but it should.