JessicaYeh / rom-exchange-web

ROM Exchange - Ragnarok M: Eternal Love Exchange Price History
https://www.romexchange.com
75 stars 18 forks source link

Data Fetching #65

Open Renzio- opened 4 years ago

Renzio- commented 4 years ago

Hi Jessica,

Can you point me how did you manage to pull ItemData from Exchange in rom? Is there any API available to do this? Are there other APIs that we can pull like charData or guildData?

aaronumerouno commented 3 years ago

Im just looking at her code and saw your comment. She posted in Reddit that she is using a bot that runs script to simulate screen clicks to get the data.

here is what she wrote "I actually have not decrypted their responses or even started sniffing anything with Wireshark haha. I just know that is approximately the process that needs to be followed because I've done similar scraping projects for other games.

It's really a pretty simple and naive bot. I have an Android emulator running ROM on my PC and I used a scripting language that can simulate mouse clicks on the screen (basically a macro) and I wrote a script to go through every category and every item in each category to capture the name and price using OCR. Then it uploads the data to the database and runs another script that re-calculates the statistics for each item. There were a few challenges with regards to accuracy but it's nearly 100% now. Pretty soon I should be able to schedule the script to automatically run overnight and just forget about it. But soon I would like to just abandon this script and be able to get the data directly via requests, since that would mean I can poll more frequently and not have to worry about accuracy at all.

I don't plan to open source that script for the time being, since it's not really optimized to be run on a different setup (a lot of the coordinates are hard coded).

Feel free to ask more questions though."

Hope that answers your questions Source: https://www.reddit.com/r/RagnarokMobile/comments/amgkan/new_exchange_price_history_site_with_global_and/efm566v/