问题描述
限时送ChatGPT账号..我将能够检索存储在 Twitter Card 中的 HTML 标记 (https://dev.twitter/docs/卡片).
I would be able to retrieve HTML markup of what is stored in Twitter Card (https://dev.twitter/docs/cards).
到目前为止,我使用 TweetSharp 库从某个用户的时间轴中检索推文.但是,这并不奇怪,因为卡片是新事物,因此不包括在内.
Up until now I used TweetSharp library to retrieve tweets from some user's timeline. But, what is not surprising, because cards are new thing, it is not included.
有谁知道,是否可以通过 API 访问卡片(Twitter 爬虫缓存的数据)?
Does anyone know, if it is possible to access card (data cached by Twitter crawler) with API?
推荐答案
Twitter 卡片本身不会通过 Twitter API 公开.
The Twitter cards themselves are not exposed through the Twitter API.
您需要做的是向提到的 URL 发出请求并检查 <head>
元素以查看其中是否包含 Twitter Card 信息.
What you'll need to do is make a request to the URL mentioned and examine the <head>
element to see if they have the Twitter Card info in there.
这篇关于从 API 获取 Twitter 卡片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论