matomo-org / plugin-TrackingSpamPrevention

GNU General Public License v3.0
12 stars 7 forks source link

Adjusting the Azure download URL parsing to fix invalid URL error #86

Closed snake14 closed 1 year ago

snake14 commented 1 year ago

Description:

This fixes a parsing issue when determining the full Azure download URL. Fixes: #85

Review

AltamashShaikh commented 1 year ago

We are parsing the HTML and trying to download the URL and content of the page can change and can cause this issue, did a google search to find a direct API, but looks like this is the only best way to get the data,

tsteur commented 1 year ago

👍 @AltamashShaikh was just wondering why it worked before and now not anymore and if we can make the solution more stable in case they change their HTML again tomorrow back to what is was for example. Not too important maybe, was just checking if we know why it broke.

snake14 commented 1 year ago

@tsteur I didn't see an exact reason for the change. As Altamash mentioned, it looks like the content periodically changes and we have had to make other adjustments in the past. I'm not really sure if there's a good way to make it less fragile when they change things on us. I added an integration test that will hopefully help alert us better.

tsteur commented 1 year ago

Thanks @snake14 👍