scrapio 1.1.1 → 1.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae0b4ed4d0f63eecef44c12169f11f2db4ddfe394a4ce91fda943d0990d9c617
4
- data.tar.gz: 3973224543e9cb45a885eec70e3a2c70d89374392b6e94d61ebc42f5b4385936
3
+ metadata.gz: 31b0030dedce45ac96d108f4869e218f6b40ea6db264f981319a252610366961
4
+ data.tar.gz: 79d78805bb3ec04fe89dacdc179b775397f02bcef4c0eb58c724905fa0f1117c
5
5
  SHA512:
6
- metadata.gz: 36f05244c3a9662a9e0e99a3af16bf1c60bca4e351d1473a6bbbc3a860a118a61ad837e4cf13889a3d364db7ccd2444ae5e2e15a87fd291bd32f36162d445b0b
7
- data.tar.gz: 7ef9b4738e632c0512c40b92f6df3fb1d06bc325213d7142102cfd95816c0e1a408aa609db8af2d7b9b1ef2b72b384a739865cc589734ae31349bad9a3322048
6
+ metadata.gz: d43cf4d5884ce7e8d26ec17e047bc1b60f472f212eb1dacd592ccef58b30ecb3a0adc08b5bb33fe0272942bad6f19ec523d1217312b2995375c9f3eaa37bd940
7
+ data.tar.gz: 5c0c8c7425d7a27629fe9c3db0ef473de69f64dd7267a98d193a31614f350cf45c81fa26a961972b7e2daae14d70b0328a58e6828657b348b434523b3d133cd0
@@ -12,28 +12,47 @@ require_relative "resources/search"
12
12
  require_relative "resources/map"
13
13
  require_relative "resources/booking"
14
14
  require_relative "resources/agoda"
15
+ require_relative "resources/airbnb"
16
+ require_relative "resources/chatgpt"
17
+ require_relative "resources/perplexity"
18
+ require_relative "resources/gemini"
19
+ require_relative "resources/bing"
20
+ require_relative "resources/reddit"
21
+ require_relative "resources/tiktok"
22
+ require_relative "resources/target"
23
+ require_relative "resources/apple_app_store"
15
24
 
16
25
  module Scrapio
17
26
  class Client
18
27
  attr_reader :fetch, :google, :amazon, :walmart, :youtube, :jobs, :crawl, :interact,
19
- :fast_search, :search, :map, :booking, :agoda
28
+ :fast_search, :search, :map, :booking, :agoda,
29
+ :airbnb, :chatgpt, :perplexity, :gemini, :bing, :reddit, :tiktok, :target, :apple_app_store
20
30
 
21
31
  def initialize(api_key, base_url: HttpClient::DEFAULT_BASE_URL, timeout: HttpClient::DEFAULT_TIMEOUT)
22
32
  http = HttpClient.new(api_key, base_url: base_url, timeout: timeout)
23
33
 
24
- @fetch = Resources::Fetch.new(http)
25
- @google = Resources::Google.new(http)
26
- @amazon = Resources::Amazon.new(http)
27
- @walmart = Resources::Walmart.new(http)
28
- @youtube = Resources::YouTube.new(http)
29
- @jobs = Resources::Jobs.new(http)
30
- @crawl = Resources::Crawl.new(http)
31
- @interact = Resources::Interact.new(http)
32
- @fast_search = Resources::FastSearch.new(http)
33
- @search = Resources::Search.new(http)
34
- @map = Resources::Map.new(http)
35
- @booking = Resources::Booking.new(http)
36
- @agoda = Resources::Agoda.new(http)
34
+ @fetch = Resources::Fetch.new(http)
35
+ @google = Resources::Google.new(http)
36
+ @amazon = Resources::Amazon.new(http)
37
+ @walmart = Resources::Walmart.new(http)
38
+ @youtube = Resources::YouTube.new(http)
39
+ @jobs = Resources::Jobs.new(http)
40
+ @crawl = Resources::Crawl.new(http)
41
+ @interact = Resources::Interact.new(http)
42
+ @fast_search = Resources::FastSearch.new(http)
43
+ @search = Resources::Search.new(http)
44
+ @map = Resources::Map.new(http)
45
+ @booking = Resources::Booking.new(http)
46
+ @agoda = Resources::Agoda.new(http)
47
+ @airbnb = Resources::Airbnb.new(http)
48
+ @chatgpt = Resources::Chatgpt.new(http)
49
+ @perplexity = Resources::Perplexity.new(http)
50
+ @gemini = Resources::Gemini.new(http)
51
+ @bing = Resources::Bing.new(http)
52
+ @reddit = Resources::Reddit.new(http)
53
+ @tiktok = Resources::TikTok.new(http)
54
+ @target = Resources::Target.new(http)
55
+ @apple_app_store = Resources::AppleAppStore.new(http)
37
56
  end
38
57
  end
39
58
  end
@@ -0,0 +1,20 @@
1
+ module Scrapio
2
+ module Resources
3
+ class Airbnb
4
+ def initialize(http) = @http = http
5
+
6
+ def search(location:, check_in: nil, check_out: nil, adults: nil, children: nil, infants: nil, pets: nil)
7
+ @http.get("/v1/airbnb/search", {
8
+ location: location, check_in: check_in, check_out: check_out,
9
+ adults: adults, children: children, infants: infants, pets: pets,
10
+ })
11
+ end
12
+
13
+ def get_listing(listing_id, check_in: nil, check_out: nil, adults: nil)
14
+ @http.get("/v1/airbnb/listing", {
15
+ listing_id: listing_id, check_in: check_in, check_out: check_out, adults: adults,
16
+ })
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,11 @@
1
+ module Scrapio
2
+ module Resources
3
+ class AppleAppStore
4
+ def initialize(http) = @http = http
5
+
6
+ def get_app(url)
7
+ @http.get("/v1/apple-app-store/app", { url: url })
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ module Scrapio
2
+ module Resources
3
+ class Bing
4
+ def initialize(http) = @http = http
5
+
6
+ def search(search, geo: nil, locale: nil, domain: nil, page: nil, page_count: nil)
7
+ @http.get("/v1/bing/search", {
8
+ search: search, geo: geo, locale: locale, domain: domain, page: page, page_count: page_count,
9
+ })
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ module Scrapio
2
+ module Resources
3
+ class Chatgpt
4
+ def initialize(http) = @http = http
5
+
6
+ def prompt(prompt, search: nil, geo: nil)
7
+ @http.get("/v1/chatgpt/prompt", { prompt: prompt, search: search, geo: geo })
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Scrapio
2
+ module Resources
3
+ class Gemini
4
+ def initialize(http) = @http = http
5
+
6
+ def prompt(prompt, geo: nil)
7
+ @http.get("/v1/gemini/prompt", { prompt: prompt, geo: geo })
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Scrapio
2
+ module Resources
3
+ class Perplexity
4
+ def initialize(http) = @http = http
5
+
6
+ def prompt(prompt, geo: nil)
7
+ @http.get("/v1/perplexity/prompt", { prompt: prompt, geo: geo })
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,19 @@
1
+ module Scrapio
2
+ module Resources
3
+ class Reddit
4
+ def initialize(http) = @http = http
5
+
6
+ def get_post(url)
7
+ @http.get("/v1/reddit/post", { url: url })
8
+ end
9
+
10
+ def get_subreddit(subreddit: nil, url: nil)
11
+ @http.get("/v1/reddit/subreddit", { subreddit: subreddit, url: url })
12
+ end
13
+
14
+ def get_user(username: nil, url: nil)
15
+ @http.get("/v1/reddit/user", { username: username, url: url })
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ module Scrapio
2
+ module Resources
3
+ class Target
4
+ def initialize(http) = @http = http
5
+
6
+ def get_product(product_id, delivery_type: nil, delivery_zip: nil, store_id: nil)
7
+ @http.get("/v1/target/product", {
8
+ product_id: product_id, delivery_type: delivery_type, delivery_zip: delivery_zip, store_id: store_id,
9
+ })
10
+ end
11
+
12
+ def search(search, delivery_type: nil, delivery_zip: nil, store_id: nil)
13
+ @http.get("/v1/target/search", {
14
+ search: search, delivery_type: delivery_type, delivery_zip: delivery_zip, store_id: store_id,
15
+ })
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,11 @@
1
+ module Scrapio
2
+ module Resources
3
+ class TikTok
4
+ def initialize(http) = @http = http
5
+
6
+ def get_post(url)
7
+ @http.get("/v1/tiktok/post", { url: url })
8
+ end
9
+ end
10
+ end
11
+ end
@@ -17,6 +17,10 @@ module Scrapio
17
17
  def get_subtitles(video_id, language: nil)
18
18
  @http.get("/v1/youtube/subtitles", { video_id: video_id, language: language })
19
19
  end
20
+
21
+ def get_channel(handle, limit: nil)
22
+ @http.get("/v1/youtube/channel", { handle: handle, limit: limit })
23
+ end
20
24
  end
21
25
  end
22
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrapio
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrapio
@@ -23,16 +23,25 @@ files:
23
23
  - lib/scrapio/errors.rb
24
24
  - lib/scrapio/http_client.rb
25
25
  - lib/scrapio/resources/agoda.rb
26
+ - lib/scrapio/resources/airbnb.rb
26
27
  - lib/scrapio/resources/amazon.rb
28
+ - lib/scrapio/resources/apple_app_store.rb
29
+ - lib/scrapio/resources/bing.rb
27
30
  - lib/scrapio/resources/booking.rb
31
+ - lib/scrapio/resources/chatgpt.rb
28
32
  - lib/scrapio/resources/crawl.rb
29
33
  - lib/scrapio/resources/fast_search.rb
30
34
  - lib/scrapio/resources/fetch.rb
35
+ - lib/scrapio/resources/gemini.rb
31
36
  - lib/scrapio/resources/google.rb
32
37
  - lib/scrapio/resources/interact.rb
33
38
  - lib/scrapio/resources/jobs.rb
34
39
  - lib/scrapio/resources/map.rb
40
+ - lib/scrapio/resources/perplexity.rb
41
+ - lib/scrapio/resources/reddit.rb
35
42
  - lib/scrapio/resources/search.rb
43
+ - lib/scrapio/resources/target.rb
44
+ - lib/scrapio/resources/tiktok.rb
36
45
  - lib/scrapio/resources/walmart.rb
37
46
  - lib/scrapio/resources/youtube.rb
38
47
  homepage: https://scrapio.dev
@@ -40,7 +49,6 @@ licenses:
40
49
  - MIT
41
50
  metadata:
42
51
  homepage_uri: https://scrapio.dev
43
- source_code_uri: https://github.com/xsronhou/scrapping-tool
44
52
  documentation_uri: https://scrapio.dev/docs
45
53
  rdoc_options: []
46
54
  require_paths: