Notorious-Guild / scraper

scrapes and filters users from wowprogress then posts them to a discord webhook
GNU General Public License v3.0
2 stars 0 forks source link

[BUG] Discord posts sometimes return a 400 error #3

Open Puffinz opened 3 years ago

Puffinz commented 3 years ago

Sometimes when the scraper tries to post to discord, it gets back a 400 error. This is only happening for specific characters in which they never get posted. There must be something with them that is causing the embed request to be invalid.

Example players: https://www.warcraftlogs.com/character/us/sargeras/rarehunt https://www.warcraftlogs.com/character/us/proudmoore/hanali

algorcode commented 3 years ago

if the url to someone's spec icon is invalid it will cause a 400 response from discord when posting the imbed. From looking at both of the player's profiles, they logged off as Beast Master. There was a similar issue with Demon Hunter's and Death Knight's because their class names had spaces in them. Likely similar issue because of the spec name. I'll look into this issue.

Puffinz commented 3 years ago

Still seem to be getting this error.

Example:

[main] INFO  Scraper.ScrapeResource - Player Aspyx-Tichondrius unable to post to discord. (HTTP Status 400)

Armory WowProgress WarcraftLogs

algorcode commented 3 years ago

This problem seems to only ever be with BM Hunters. I'll try to debug and figure out why later. Previously it was happening due to their spec icon url containing spaces, not sure what it is this time.