Closed AEFeinstein closed 11 months ago
This program is looking at the page source for https://wpn.wizards.com/en/rules-documents for the docs, but at some point it changed from having the links in HTML to having links in a <script>
tag, so it's not finding updates.
Does your code actually execute the script in order to render the page, or does it just parse the HTTP response? If it does the former, could that be the reason why it could find the new MTR but not the new IPG? I say this because, for me, the page doesn't render the element of the JS array in that script that corresponds to the IPG. That is, I see all elements of that array (the data.fetch."DocumentationDownload:0".documents
element of the object that the script function returns) rendered on the webpage, except for a few, the first of which happens to be the IPG, and the second of which is a Constructed deck registration sheet (element of the array with id: "7Ht11QxdDPGBd1Cg01HNfN"
) that should appear between the Midnight Hunt and Crimson Vow deck checklists.
It parses the HTTP response, no actual rendering. I updated it to check within <script>
tags, which is a quick and good-enough hack for me. The HTML was updated in 9eb2aee6b23bb683f7e6b9938facc25b4ae08414. If you want to write a more sustainable solution, I'm open to it. That may be impossible unless you can tell WotC to stop changing their page, haha).
It might be a good idea to check Judge Academy in addition to WPN. At least then if one changes, the other is unlikely to have changed at the same time.
Thanks for the speedy fix! I'm seeing the new version in the app now 😊
I'll leave it to you if your want to write in a check for Judges Academy. It'd be somewhere over here https://github.com/AEFeinstein/Mtgjson2Familiar/blob/9eb2aee6b23bb683f7e6b9938facc25b4ae08414/src/com/gelakinetic/mtgJson2Familiar/JudgeDocConverter.java#L126C12-L126C12
Copied from https://github.com/AEFeinstein/mtg-familiar/issues/616: