diff --git a/app/models/list_import/anime_planet.rb b/app/models/list_import/anime_planet.rb index 682265ef5..fed71e432 100644 --- a/app/models/list_import/anime_planet.rb +++ b/app/models/list_import/anime_planet.rb @@ -58,7 +58,7 @@ def get(url, page = 1) .get(url) @cookie_jar = request.cookies - html = Nokogiri::HTML(request.body) + html = Nokogiri::HTML(request.body.to_s) html end diff --git a/app/services/youtube_service/client.rb b/app/services/youtube_service/client.rb index e9f364da4..9cca11286 100644 --- a/app/services/youtube_service/client.rb +++ b/app/services/youtube_service/client.rb @@ -17,7 +17,7 @@ def initialize(token, api_key: nil) def valid? res = HTTP.get(VERIFY_URL.expand(query: { access_token: token })) - res.success? && JSON.parse(res.body)['aud'] == api_key + res.status.success? && JSON.parse(res.body)['aud'] == api_key end def channel_id @@ -26,7 +26,7 @@ def channel_id mine: 'true', access_token: token })) - return unless res.success? + return unless res.status.success? channels = JSON.parse(res.body)['items'] channels.first['id'] end