Having Trouble with visit_url() and the mall

Gandalph

New member
So, I've been trying to create a script that checks the current mall prices on some items that I'd like to track. Unfortunately, the default behavior of mall_price() skipping the 5 lowest prices is no good for what I'm trying to do, and I can't figure out how to read the text output from cli_execute(), so I'm unable to use the searchmall command. So I'm attempting to build my own function that duplicates the functionality of mall_price(), except that it returns the lowest price for the item and invokes the "no limit" advanced search criterion.

I looked through the source of the mall search page, and noted the fields and values which I should add to the post fields. Using the fields as arguments in my browser, I was able to ge tthe seraching to work properly. However, when I try to use visit_url() with the required parameters, a blank page is returned. After a while, I started playing around with it, and I found that visit_url("mall.php"); returns a blank page even without the extra parameters for the search. I can visit the page in my browser without issue, but KoLMafia has a problem with it.

I tried visiting other pages as well with the command, and found several things:

visit_url("messages.php"); seems to work fine, the HTML of the page is returned.
visit_url("game.php"); returns a blank page, and fills the command line with errors about "no protocol in frame charpane".

So, has anyone been able to successfully get at the mall in this way? Alternatively, would the maintainers of the ASH functionality be willing to put in an option for "no stores with limits on items" and to control the number of skipped stores in a search when using mall_price();? It seems that this functionality could potentially be useful for tuning the behavior of a script that involves using the mall.
 
mall.php is intentionally blocked to prevent mafia being used to make a mallbot. Skipping stores with limits could be useful.
 
Back
Top