https://github.com/tada-team/dyatl
Web preivews
https://github.com/tada-team/dyatl
Last synced: 2 months ago
JSON representation
Web preivews
- Host: GitHub
- URL: https://github.com/tada-team/dyatl
- Owner: tada-team
- License: mit
- Created: 2020-12-31T01:34:17.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-29T02:05:58.000Z (about 4 years ago)
- Last Synced: 2025-01-30T02:14:55.483Z (9 months ago)
- Language: Go
- Size: 39.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://codecov.io/gh/tada-team/dyatl)
# Links checkerTakes title and og:image from any page:
```go
c := dyatl.Client()
result, err := c.Preview("https://meduza.io/shapito/2020/12/29/kazhduyu-zimu-v-rossii-edyat-zamerzshiy-doshirak-ved-chem-esche-zanyatsya-v-yakutske-ili-novosibirske")
if err != nil {
panic(err)
}fmt.Println("Title:", c.Title)
fmt.Println("ThumbnailUrl:", c.ThumbnailUrl)
```Special cases like YouTube:
```go
c := dyatl.Client()
result, err := c.Preview("https://www.youtube.com/watch?v=eLAHSRmFFzE")
if err != nil {
panic(err)
}fmt.Println("Title:", c.Title)
fmt.Println("ThumbnailUrl:", c.ThumbnailUrl)
fmt.Println("YoutubeId:", c.YoutubeId)
```