google-local-results-ai-parser 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62925be13b2ff224585862444f2e77bdea9f7975316b2f66253e7e2fa7a6fe34
4
- data.tar.gz: e2ec29030b6c442f955b3d4c54b21473a23f214d3db0944e2006c6ac3c7c9446
3
+ metadata.gz: 9f8076de3793dabc268bc5705443e28202655e26c5a1503498767e1b8a62ff16
4
+ data.tar.gz: 7e3cf96add3d90d2e6174f9acda7f6cd8357f2f06792d46fc308aa80cc7fa93f
5
5
  SHA512:
6
- metadata.gz: 48054b17769730be43150502b909a82666adca5f35b2bf6fa235cf4b96da37040338eb41c62382da0320729158b3d70898efb6d595ad6cef7363d212aa4414f1
7
- data.tar.gz: af7d2196995a5991c017940af28de5816e1fc9535b1424c070670db65cf4f6df546d76d2c77ed0f64281810dda649f769e7ead071e5c99c68f43a18c4dbf89ee
6
+ metadata.gz: 91c997a71f5765a0d43cc1c4418cecc1a83b00eb3b418f4aed6802a1c5fa78391b337384433147cf5c7eb8af5455ad07289f8440c31e58585493978d4673394a
7
+ data.tar.gz: b0d1a462cba2a8097c0bc54ec0142e78b5d7daffe5c5ed4c663ddb7522c35391ee4ba9587f803a711f2e0fbe7395ab7d353254eda6ecab6212bbeed64c563b4d
@@ -2,7 +2,6 @@ require 'nokolexbor'
2
2
  require 'http'
3
3
  require 'parallel'
4
4
  require 'json'
5
- require 'pry'
6
5
 
7
6
  module GoogleLocalResultsAiParser
8
7
  DEFAULT_SERVER = 'https://api-inference.huggingface.co/models/serpapi/bert-base-local-results'.freeze
@@ -476,7 +475,8 @@ module GoogleLocalResultsAiParser
476
475
  end
477
476
  end
478
477
 
479
- return results, label_order, duplicates if not_service_option_duplicates == []
478
+ already_a_service_option = caught_results_indices.all? {|index| results[index][:result][0][0]["label"] == "service options"}
479
+ return results, label_order, duplicates if already_a_service_option
480
480
  # Zero out the `type` or `description`, and put it to last position
481
481
  caught_results_indices.each do |caught_index|
482
482
  service_options_hash = results[caught_index][:result][0].find {|hash| hash["label"] == "service options" }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-local-results-ai-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emirhan Akdeniz