Skip to content

Commit

Permalink
add 'curl' into UserAgent to get OGP
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitoyama committed Oct 24, 2023
1 parent 0e335a8 commit 60110f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion service/ogp/parser/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ var client = http.Client{
}

// X(Twitter)のOGPを取得するのにuserAgentの中にbotという文字列が入っている必要がある
const userAgent = "traq-ogp-fetcher-bot; contact: github.com/traPtitech/traQ"
// Spotifyの新しいOGPを取得するのにuserAgentの中にcurl-botという文字列が入っている必要がある
const userAgent = "traq-ogp-fetcher-curl-bot; contact: github.com/traPtitech/traQ"

func FetchSpecialDomainInfo(url *url.URL) (og *opengraph.OpenGraph, meta *DefaultPageMeta, isSpecialDomain bool, err error) {
switch url.Host {
Expand Down

0 comments on commit 60110f8

Please sign in to comment.