UEWBot / dipvis

Django-based visualiser for tournaments for the boardgame Diplomacy
GNU General Public License v3.0
7 stars 5 forks source link

Validate external URLs #248

Open UEWBot opened 1 year ago

UEWBot commented 1 year ago

Game.external_url doesn't currently have a validator function. Would be useful to add one but it would have to go to the external site (possibly more than once if we take the approach of scrape_external_site() and try it as a Backstabbr URL and then as a WebDip URL). That may be too slow for a validator, particularly as we usually create multiple Games from a single POST. At a minimum, we could do some sanity-checking of the URL. This would help with issue #207