Coffee-fueled-deadlines / OSRSBytes

OSRSBytes is an all-in-one Python library for Old School Runescape (OSRS) that features Item Information Lookup, OSRS Hiscores, and Grand Exchange Market information.
Eclipse Public License 2.0
49 stars 13 forks source link

Escape username for invalid URL characters (ie. spaces) #12

Closed tylersweat closed 3 years ago

tylersweat commented 3 years ago

Using Python3's built-in urllib package, escape the username so that the Hiscores will still work for a username containing a space without throwing an exception.

Before: image

After: image

Coffee-fueled-deadlines commented 3 years ago

While a good idea, I'd rather not import an additional library (urllib) to fix an issue with a space in the name. Most likely I'll use a .replace(" ","%20") do accomplish the same thing without the need for an additional library. Thank you though.

tylersweat commented 3 years ago

I'll go make that change.