kuhnertdm / wow-addon-updater

Python script for mass-updating World of Warcraft addons
GNU General Public License v3.0
116 stars 28 forks source link

Curse Project scraped version not always correct #23

Closed metal-pony closed 6 years ago

metal-pony commented 6 years ago

SiteHandler.getCurseProjectVersion looks for the first occurrence of data-name in html page source, an attribute which usually (but not always) contains an addon version string.

Problem case: https://wow.curseforge.com/projects/deadly-boss-mods/files The first data-name occurs in data-name="Deadly Boss Mods (DBM)">, and the version is recorded in the installed.txt as Deadly Boss Mods (DBM) when this mod is installed. This will cause the addon to not be updated properly.

Looking more closely at Curse Project pages, it looks like the version string we want is the one in the first row of the table of files. All these table rows have the css class project-file-list-item. It should be more accurate to search for data-name in the first table row with this class.

zurohki commented 6 years ago

Hey sparklicorn, I put a fix for this in #20 , you can give that a try if you're still looking for a patch.

kuhnertdm commented 6 years ago

Fixed with recent merge of #20 and future @zurohki updates.