outscraper 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +32 -16
- data/examples/Emails And Contacts.md +32 -0
- data/examples/Google Maps Reviews.md +41 -0
- data/examples/Google Maps.md +35 -0
- data/examples/Google SERP.md +32 -0
- data/examples/Phones Validator.md +32 -0
- data/lib/outscraper/version.rb +1 -1
- data/lib/outscraper.rb +18 -0
- metadata +10 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1dd2b61df018c2b7b9f46537e9e088f42cc75d1c9eb1d756966303686062245
|
4
|
+
data.tar.gz: a3e1423a8a94e84de918702b5d112051552cad84b121d6d30205fa3572bade54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52d84300f735a8f0e0dd0b2f42a680bfd129958f624dc374ffa2a8fe1784ff743cfe1f3bf5aec5f1010a1f2065b122640f2128646d3b6be1ae66050753cd1fde
|
7
|
+
data.tar.gz: 0be887cd6b95716c55501ffa7083ed45bed2ab10792f6f93ffc92acda3ae7ee73e48aefda1bd529d9ed21c00cbb60b3f8a8bf6332d64cfc22b1cafdea2c3fbb3
|
data/README.md
CHANGED
@@ -1,22 +1,46 @@
|
|
1
|
-
# Outscraper
|
1
|
+
# Outscraper Ruby Library
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
The library provides convenient access to the [Outscraper API](https://app.outscraper.com/api-docs) from applications written in the Ruby language. Allows using [Outscraper's services](https://outscraper.com/services/) from your code.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
7
|
Install the gem and add to the application's Gemfile by executing:
|
10
|
-
|
11
|
-
|
8
|
+
```bash
|
9
|
+
bundle add outscraper
|
10
|
+
```
|
12
11
|
|
13
12
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
13
|
+
```bash
|
14
|
+
gem install outscraper
|
15
|
+
```
|
16
|
+
|
17
|
+
[Link to the Ruby package page](https://rubygems.org/gems/outscraper)
|
14
18
|
|
15
|
-
|
19
|
+
## Initialization
|
20
|
+
```ruby
|
21
|
+
require 'Outscraper'
|
22
|
+
|
23
|
+
client = Outscraper::Client.new('SECRET_API_KEY')
|
24
|
+
```
|
25
|
+
[Link to the profile page to create the API key](https://app.outscraper.com/profile)
|
16
26
|
|
17
27
|
## Usage
|
18
28
|
|
19
|
-
|
29
|
+
```ruby
|
30
|
+
# Search for businesses in specific locations:
|
31
|
+
result = client.google_maps_search_v2('restaurants brooklyn usa', limit: 20, language: 'en', region: 'us')
|
32
|
+
|
33
|
+
# Get data of the specific place by id
|
34
|
+
result = client.google_maps_search_v2('ChIJrc9T9fpYwokRdvjYRHT8nI4', language: 'en')
|
35
|
+
|
36
|
+
# Get reviews of the specific place by id
|
37
|
+
result = client.google_maps_reviews_v3('ChIJrc9T9fpYwokRdvjYRHT8nI4', reviews_limit: 20, language: 'en')
|
38
|
+
|
39
|
+
# Search contacts from website
|
40
|
+
result = client.emails_and_contacts('outscraper.com')
|
41
|
+
```
|
42
|
+
|
43
|
+
[More examples](https://github.com/outscraper/outscraper-ruby/tree/master/examples)
|
20
44
|
|
21
45
|
## Development
|
22
46
|
|
@@ -27,11 +51,3 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
27
51
|
## Contributing
|
28
52
|
|
29
53
|
Bug reports and pull requests are welcome on GitHub at https://github.com/outscraper/outscraper-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/outscraper/outscraper-ruby/blob/master/CODE_OF_CONDUCT.md).
|
30
|
-
|
31
|
-
## License
|
32
|
-
|
33
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
34
|
-
|
35
|
-
## Code of Conduct
|
36
|
-
|
37
|
-
Everyone interacting in the Outscraper project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/outscraper/outscraper-ruby/blob/master/CODE_OF_CONDUCT.md).
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# Emails And Contacts Scraper With Ruby
|
2
|
+
|
3
|
+
Allows finding email addresses, social links, and phones from domains via [Outscraper API](https://app.outscraper.com/api-docs#tag/Emails-and-Contacts).
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Install the gem and add to the application's Gemfile by executing:
|
8
|
+
```bash
|
9
|
+
bundle add outscraper
|
10
|
+
```
|
11
|
+
|
12
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
13
|
+
```bash
|
14
|
+
gem install outscraper
|
15
|
+
```
|
16
|
+
|
17
|
+
[Link to the Ruby package page](https://rubygems.org/gems/outscraper)
|
18
|
+
|
19
|
+
## Initialization
|
20
|
+
```ruby
|
21
|
+
require 'Outscraper'
|
22
|
+
|
23
|
+
client = Outscraper::Client.new('SECRET_API_KEY')
|
24
|
+
```
|
25
|
+
[Link to the profile page to create the API key](https://app.outscraper.com/profile)
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
# Search contacts from website:
|
31
|
+
result = client.emails_and_contacts('outscraper.com')
|
32
|
+
```
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# Google Maps Reviews Scraper With Ruby
|
2
|
+
|
3
|
+
The library provides real-time access to the reviews from Google Maps via [Outscraper API](https://app.outscraper.com/api-docs#tag/Google-Reviews).
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Install the gem and add to the application's Gemfile by executing:
|
8
|
+
```bash
|
9
|
+
bundle add outscraper
|
10
|
+
```
|
11
|
+
|
12
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
13
|
+
```bash
|
14
|
+
gem install outscraper
|
15
|
+
```
|
16
|
+
|
17
|
+
[Link to the Ruby package page](https://rubygems.org/gems/outscraper)
|
18
|
+
|
19
|
+
## Initialization
|
20
|
+
```ruby
|
21
|
+
require 'Outscraper'
|
22
|
+
|
23
|
+
client = Outscraper::Client.new('SECRET_API_KEY')
|
24
|
+
```
|
25
|
+
[Link to the profile page to create the API key](https://app.outscraper.com/profile)
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
# Get reviews of the specific place by id
|
31
|
+
result = client.google_maps_reviews_v3('ChIJrc9T9fpYwokRdvjYRHT8nI4', reviews_limit: 20, language: 'en')
|
32
|
+
|
33
|
+
# Get reviews for places found by search query
|
34
|
+
result = client.google_maps_reviews_v3('Memphis Seoul brooklyn usa', reviews_limit: 20, limit: 500, language: 'en')
|
35
|
+
|
36
|
+
# Get only new reviews during last 24 hours
|
37
|
+
yesterday_timestamp = 1657980986
|
38
|
+
|
39
|
+
result = client.google_maps_reviews_v3(
|
40
|
+
'ChIJrc9T9fpYwokRdvjYRHT8nI4', sort: 'newest', cutoff: yesterday_timestamp, reviews_limit: 100, language: 'en')
|
41
|
+
```
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# Google Maps Scraper With Ruby
|
2
|
+
|
3
|
+
The library provides real-time access to the places from Google Maps via [Outscraper API](https://app.outscraper.com/api-docs#tag/Google-Maps).
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Install the gem and add to the application's Gemfile by executing:
|
8
|
+
```bash
|
9
|
+
bundle add outscraper
|
10
|
+
```
|
11
|
+
|
12
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
13
|
+
```bash
|
14
|
+
gem install outscraper
|
15
|
+
```
|
16
|
+
|
17
|
+
[Link to the Ruby package page](https://rubygems.org/gems/outscraper)
|
18
|
+
|
19
|
+
## Initialization
|
20
|
+
```ruby
|
21
|
+
require 'Outscraper'
|
22
|
+
|
23
|
+
client = Outscraper::Client.new('SECRET_API_KEY')
|
24
|
+
```
|
25
|
+
[Link to the profile page to create the API key](https://app.outscraper.com/profile)
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
# Search for businesses in specific locations:
|
31
|
+
result = client.google_maps_search_v2('restaurants brooklyn usa', limit: 20, language: 'en', region: 'us')
|
32
|
+
|
33
|
+
# Get data of the specific place by id
|
34
|
+
result = client.google_maps_search_v2('ChIJrc9T9fpYwokRdvjYRHT8nI4', language: 'en')
|
35
|
+
```
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# Google Search Results Scraper With Ruby
|
2
|
+
|
3
|
+
The library returns search results from Google based on a given search query via [Outscraper API](https://app.outscraper.com/api-docs#tag/Google-Search).
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Install the gem and add to the application's Gemfile by executing:
|
8
|
+
```bash
|
9
|
+
bundle add outscraper
|
10
|
+
```
|
11
|
+
|
12
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
13
|
+
```bash
|
14
|
+
gem install outscraper
|
15
|
+
```
|
16
|
+
|
17
|
+
[Link to the Ruby package page](https://rubygems.org/gems/outscraper)
|
18
|
+
|
19
|
+
## Initialization
|
20
|
+
```ruby
|
21
|
+
require 'Outscraper'
|
22
|
+
|
23
|
+
client = Outscraper::Client.new('SECRET_API_KEY')
|
24
|
+
```
|
25
|
+
[Link to the profile page to create the API key](https://app.outscraper.com/profile)
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
# Search for SERP results:
|
31
|
+
result = client.google_search('buy iphone 13 TX', language: 'en', region: 'us')
|
32
|
+
```
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# Phone Numbers Enricher/Validator
|
2
|
+
|
3
|
+
Returns phones carrier data (name/type), validates phones, ensures messages deliverability via [Outscraper API](https://app.outscraper.com/api-docs#tag/Phones/paths/~1phones-enricher/get).
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Install the gem and add to the application's Gemfile by executing:
|
8
|
+
```bash
|
9
|
+
bundle add outscraper
|
10
|
+
```
|
11
|
+
|
12
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
13
|
+
```bash
|
14
|
+
gem install outscraper
|
15
|
+
```
|
16
|
+
|
17
|
+
[Link to the Ruby package page](https://rubygems.org/gems/outscraper)
|
18
|
+
|
19
|
+
## Initialization
|
20
|
+
```ruby
|
21
|
+
require 'Outscraper'
|
22
|
+
|
23
|
+
client = Outscraper::Client.new('SECRET_API_KEY')
|
24
|
+
```
|
25
|
+
[Link to the profile page to create the API key](https://app.outscraper.com/profile)
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
# Search contacts from website:
|
31
|
+
result = client.phones_enricher('12812368208')
|
32
|
+
```
|
data/lib/outscraper/version.rb
CHANGED
data/lib/outscraper.rb
CHANGED
@@ -13,6 +13,17 @@ module Outscraper
|
|
13
13
|
self.class.headers 'X-API-KEY' => api_key
|
14
14
|
end
|
15
15
|
|
16
|
+
def google_search(query, pages_per_query: 1, uule: '', language: 'en', region: nil)
|
17
|
+
response = self.class.get("/google-search-v2", 'query': {
|
18
|
+
query: query,
|
19
|
+
pagesPerQuery: pages_per_query,
|
20
|
+
uule: uule,
|
21
|
+
language: language,
|
22
|
+
region: region,
|
23
|
+
async: false,
|
24
|
+
}).parsed_response['data']
|
25
|
+
end
|
26
|
+
|
16
27
|
def google_maps_search_v2(query, limit: 20, drop_duplicates: false, language: 'en', region: nil, skip: 0)
|
17
28
|
response = self.class.get("/maps/search-v2", 'query': {
|
18
29
|
query: query,
|
@@ -49,5 +60,12 @@ module Outscraper
|
|
49
60
|
async: false,
|
50
61
|
}).parsed_response['data']
|
51
62
|
end
|
63
|
+
|
64
|
+
def phones_enricher(query)
|
65
|
+
response = self.class.get("/phones-enricher", 'query': {
|
66
|
+
query: query,
|
67
|
+
async: false,
|
68
|
+
}).parsed_response['data']
|
69
|
+
end
|
52
70
|
end
|
53
71
|
end
|
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: outscraper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Outscraper
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
11
|
date: 2022-07-16 00:00:00.000000000 Z
|
@@ -39,6 +39,11 @@ files:
|
|
39
39
|
- LICENSE.txt
|
40
40
|
- README.md
|
41
41
|
- Rakefile
|
42
|
+
- examples/Emails And Contacts.md
|
43
|
+
- examples/Google Maps Reviews.md
|
44
|
+
- examples/Google Maps.md
|
45
|
+
- examples/Google SERP.md
|
46
|
+
- examples/Phones Validator.md
|
42
47
|
- lib/outscraper.rb
|
43
48
|
- lib/outscraper/version.rb
|
44
49
|
- sig/outscraper.rbs
|
@@ -52,7 +57,7 @@ metadata:
|
|
52
57
|
bug_tracker_uri: https://github.com/outscraper/outscraper-ruby/issues
|
53
58
|
documentation_uri: https://app.outscraper.com/api-docs
|
54
59
|
github_repo: ssh://github.com/outscraper/outscraper-ruby
|
55
|
-
post_install_message:
|
60
|
+
post_install_message:
|
56
61
|
rdoc_options: []
|
57
62
|
require_paths:
|
58
63
|
- lib
|
@@ -67,8 +72,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
72
|
- !ruby/object:Gem::Version
|
68
73
|
version: '0'
|
69
74
|
requirements: []
|
70
|
-
rubygems_version: 3.3.
|
71
|
-
signing_key:
|
75
|
+
rubygems_version: 3.0.3.1
|
76
|
+
signing_key:
|
72
77
|
specification_version: 4
|
73
78
|
summary: Ruby bindings for the Outscraper API
|
74
79
|
test_files: []
|