Off Topic ยป Ask Me Anything

Download replays log for analytics
Morgan Ebugo
#1
Hi everyone, this is my first post in this forum :D

I know that you can check replays clicking on a link, for example https://www.duelingbook.com/replay?id=1096928-63387841.

If you change the word "replay" with "log" in the url, it becomes something like https://www.duelingbook.com/log?id=1096928-63387841.

Clicking this will get you to a white page with all the logs already loaded, written in a red or blue font, for the two players. My idea is getting this information and do some stuff with it, like checking which cards were used, who won, and so on.

I tried to make a simple script to download the source HTML from that url, but every time I try to run it, I actually download some gibberish code that's not the log i was supposed to get when i load the url using the browser.
I also made an attempt using the selenium library (basically an application that can mimic a human browsing a page), but even with this tool i'm still struggling to get what i wanted. I thought I could somehow get the desidered output forcing the script to wait some seconds, but no success yet.

Does anyone know if this is even possible? My current workaround is right click on the white page loaded using the browser, then "save as" and in this way I manually get the source HTML.

Thanks
Cromat
#2
You can right click with your mouse after you opened Opera and/or Opera GX whichs are the internet browser. Then, you may click "Save as PDF..." for save the screenshot of the page. So you may check and read logs by opening those pdf files. Or you may press "Print Screen" button from your respective keyboard to take screenshot of your screen, then you may crop it by Paint [and create a file at here under name of "Report Glitch" and report your Paint picture at here as a glitch].








Note: Ignore the information in square brackets.
Christen57
#3
Wait. What exactly are you trying to have your script download? The log itself? Like, everything from [0:00] to [24:47]?

Couldn't you just CTRL A and copy the entire log if that's what you want?
Morgan Ebugo
#4
[quote="Christen57":22sxojrr]Wait. What exactly are you trying to have your script download? The log itself? Like, everything from [0:00] to [24:47]?

Couldn't you just CTRL A and copy the entire log if that's what you want?[/quote:22sxojrr]

Yes that's what I want to get. I don't do the CTRL+A thing, instead I save the HTML page source (in this way I also get the HTML tags and my script can read which cards are Red and which are Blue).
I made this topic to understand if there's a way to automate this process and save a bunch of clicks, that's all :D

[quote="Cromat":22sxojrr]You can right click with your mouse after you opened Opera and/or Opera GX whichs are the internet browser. Then, you may click "Save as PDF..." for save the screenshot of the page. So you may check and read logs by opening those pdf files. Or you may press "Print Screen" button from your respective keyboard to take screenshot of your screen, then you may crop it by Paint [and create a file at here under name of "Report Glitch" and report your Paint picture at here as a glitch].
[/quote:22sxojrr]

That's a bit too much convoluted :lol:
Cromat
#5
Did you manage to do what I said?
Post Reply: