hydrafetch 0.1.1 → 0.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 +4 -4
- data/README.md +2 -1
- data/lib/hydrafetch/client.rb +3 -2
- data/lib/hydrafetch/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8315d841963babfe427b351e7dc67e93ddfe23c62df84e0e2e43e075337b0859
|
|
4
|
+
data.tar.gz: 14b9d93b55922cb3201ae02721e265e9517251c54cbb27517571c8f2688d3695
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 36a5552a71ef177fe621cffcec5b951bc5710b268ec106f0fb8778a0b9bac17aedd5357a4ab87fb7eaeb2030914f55a18539ccf3d04ead7a75ba4969e3658722
|
|
7
|
+
data.tar.gz: 58106f6c25a36035f95d679b96d455a8352cdaff5506370e2ef30b601b743aa2e5db8ceeb5ddfe879b1c365dfb395b10edd533d039ee85b0e87b9256c5c2f278
|
data/README.md
CHANGED
|
@@ -126,6 +126,7 @@ end
|
|
|
126
126
|
hf.brand("stripe.com") # logos, colours, fonts, socials
|
|
127
127
|
hf.logo("stripe.com", theme: "dark", type: "icon") # one asset
|
|
128
128
|
hf.styleguide("stripe.com") # computed design system
|
|
129
|
+
hf.styleguide("https://stripe.com/pricing", maxAge: 0) # one page, read fresh
|
|
129
130
|
```
|
|
130
131
|
|
|
131
132
|
For logos in a browser use [`@hydrafetch/client-sdk`](https://github.com/Hydrafetch/client-sdk) with a publishable key. Those bill against logo pulls rather than credits.
|
|
@@ -181,7 +182,7 @@ hf = Hydrafetch::Client.new("hf_...",
|
|
|
181
182
|
| `extract(urls, **options)` | hash with `"results"` | 5 per URL |
|
|
182
183
|
| `brand(domain)` | brand hash | 5 |
|
|
183
184
|
| `logo(domain, **options)` | logo hash | 1 |
|
|
184
|
-
| `styleguide(
|
|
185
|
+
| `styleguide(domain_or_url, **options)` | design system hash | 10 |
|
|
185
186
|
| `screenshot(url, **options)` | screenshot hash | 5 |
|
|
186
187
|
| `images(url)`, `links(url)` | page assets | 1 |
|
|
187
188
|
| `crawl(url, **options)` | job hash, polled to completion | 1 per page |
|
data/lib/hydrafetch/client.rb
CHANGED
|
@@ -57,8 +57,9 @@ module Hydrafetch
|
|
|
57
57
|
get("/v1/web/brand/logo", { domain: domain }.merge(compact(options)))
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
-
def styleguide(
|
|
61
|
-
|
|
60
|
+
def styleguide(domain_or_url, **options)
|
|
61
|
+
key = domain_or_url.match?(%r{\Ahttps?://}i) ? :url : :domain
|
|
62
|
+
get("/v1/web/styleguide", { key => domain_or_url }.merge(compact(options)))
|
|
62
63
|
end
|
|
63
64
|
|
|
64
65
|
def screenshot(url, **options)
|
data/lib/hydrafetch/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hydrafetch
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hydrafetch
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Turn any URL into clean Markdown and structured data. Scrape, map, search,
|
|
14
14
|
extract, brand and bulk crawl through one API.
|