chadrem / market_bot

Google Play Android App store scraper
MIT License
361 stars 130 forks source link

Replace obsolete URI.escape with CGI.escape #71

Closed lightalloy closed 6 years ago

lightalloy commented 6 years ago

URI.escape is obsolete. Also, some developers can't be fetched when using URI.escape E.g. with URI.escape => 404

irb(main):008:0> MarketBot::Play::Developer.new('Fox & Sheep').update
ETHON: Libcurl initialized
ETHON: performed EASY effective_url=https://play.google.com/store/apps/developer?id=Fox%20&%20Sheep&start=0&gl=us&num=100&hl=en response_code=404 return_code=ok 

With CGI.escape the problem is fixed:

MarketBot::Play::Developer.new('Fox & Sheep').update
ETHON: Libcurl initialized
ETHON: performed EASY effective_url=https://play.google.com/store/apps/developer?id=Fox+%26+Sheep&start=0&gl=us&num=100&hl=en response_code=200 return_code=ok 
coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 99.516% when pulling e90f2e46f33c0b7bb67806e80e53b5b44ef5f93f on lightalloy:fix-developer-title-escaping into 4966914b51cde9051033353d7d7532e6d8215df6 on chadrem:master.

lightalloy commented 6 years ago

I've found only one place where this method was used. Hope I haven't missed anything.

chadrem commented 6 years ago

Awesome. Thank you for checking.

chadrem commented 6 years ago

I've released v1.3.1 with this fix. Thanks again.