further generalizing underway
Posted: 11 Feb 2014, 21:38
This is mostly for anthonybe's sake. No sitescript uses this version yet, so if you're only looking for working scripts, don't donwload this yet. See the wiki for further details.
High Quality Resources for Collectible Card Games and Home of the CCGHQ Team
https://www.slightlymagic.net/forum/
https://www.slightlymagic.net/forum/viewtopic.php?f=32&t=8174
Thanks for the fix! unfortunately I'm getting some more issues:LordHelmchen wrote:right. error is a simple typo in the library.
Search line 549 in LHpi-v2.8.lua for "LHpi.length" and change it to "LHpi.Length" (capital "L"). I will upload a fix once I am awake enough to decide if it's more appropriate to just change the 2.8 library file and post a note to redownload, or if a bugfix, however minor, warrants a new file version. Probably the former, considering all sitescripts would need a new version to call the new library version.
EDIT: ok, why wait, can sleep later
Please fix it yourself or redownload. wiki downlaod links will be updated in a minute (which means, they probably are already when you're reading this). I think no further documentation is needed for this.
indeed. First and last time I upload without explicitely running a last testBloodnut wrote:Thanks for the fix! unfortunately I'm getting some more issues:LordHelmchen wrote:right. error is a simple typo in the library.
Search line 549 in LHpi-v2.8.lua for "LHpi.length" and change it to "LHpi.Length" (capital "L").
...
Please fix it yourself or redownload. wiki downlaod links will be updated in a minute (which means, they probably are already when you're reading this). I think no further documentation is needed for this.
first of all you have some more typos in lines 550,554,557 where you call "site.fruc" instead of "site.frucs" but I fixed that. you might want to fix it though.
Thanks for the log. I forgot to comment out a few of the options before zip'ing it up for release. In this case, the culprit was having "OFFLINE" enabled but no local copy of the website's pages available.However, while the script executes it doesn't pull the prices and the csv remains emtpy. I think TCGplayer might have changed their API to not serve the prices publicly but I'm not sure about that though, it's the impression I got from http://store.tcgplayer.com/faq.aspx
I've attached the log for reference.
I'm kinda feeling bad now about reporting this but... "Lua runtime error: (load) LHpi library:1129: attempt to index field 'foilprice' (a nil value)".LordHelmchen wrote:indeed. First and last time I upload without explicitely running a last test
It works! well doneLordHelmchen wrote:apparently not my day toaday...
As long as you keep finding bugs on the weekend, we'll get along just fine
EDIT1: interesting find, actually. That bug must have been lurking there for a long time alrady. You probably are the first one to import only nonfoil prices since I implemented conflict handling by (shoddy) averaging.
As a workaround, please do import foil and nonfoil prices. You won't find that many foilprices on tcgplayerPriceguide, anyways It's probably not that difficult to fix, but in light of your last three posts, I think I should take the time to make sure I don't break anything else in the process.
That's a relief. I admit I only ever tested importing both foil and nonfoil, never seperately. I probably will fall back into that habit once I got this bug sorted out, too.Bloodnut wrote:It works! well doneLordHelmchen wrote:As a workaround, please do import foil and nonfoil prices.
...
We might have a misunderstanding here. The script queries http://magic.tcgplayer.com/magic_price_guides.asp, not the store. No foilage information is given on that page(s), thus the only foil prices that are imported are cards from foilonly sets or cards that are explicitely foiltweaked (see LHpi.Data for details.). At least, it should; if not, that's another bug...Oh and there are actually lots of foils in TCGplayer but the script didn't import even a single one. almost every card has a foil price. if you look a card up, on the left pane you can check the "foil" option and you will be presented with foil prices of everything (e.g. "near mint foil", "lightly played foil"...)
oh, yup you're right, disregard my rambles. and no, I'm not going to query the store per card and parse it. a minor change in their layout and it's all useless. we had those kinds of scripts before IIRC.LordHelmchen wrote:We might have a misunderstanding here. The script queries http://magic.tcgplayer.com/magic_price_guides.asp, not the store. No foilage information is given on that page(s), thus the only foil prices that are imported are cards from foilonly sets or cards that are explicitely foiltweaked (see LHpi.Data for details.). At least, it should; if not, that's another bug...
Parsing the shop with its multiple pages per set, multiple shop offers per card and dependence on scripting seems like a lot of work. It would probably be easier to write seperate sitescripts for those of the linked shops that you actually are interested in, and use MA's dynamic averaging instead of LHpi's static (and still wrong, it's on my list) one.
If you want to try either, see the wiki and feel free to suggest (or even sumit patches for) any features and/or improvements the library needs to have.