我如何从Twitter实体获取直接的Instagram链接? [英] How can I get an direct Instagram link from a twitter entity?
问题描述
我有一个Twitter提要,我可以在一条推文中找到instagram网址.
I have a twitter feed and I can find the instagram url in a tweet.
{
indices: [
90,
110
],
url: "http://t.co/kF9EXifn",
expanded_url: "http://instagr.am/p/QC8hWKL_4K/",
display_url: "instagr.am/p/QC8hWKL_4K/"
}
我需要从该对象"http://instagr.am/p/QC8hWKL_4K/"中获取展开的网址,并获得指向仅图像本身而不是图像上的链接. Instagram网站.有人知道该怎么做吗?我什至可以从网址中获取该链接吗?
What I need is to take the expanded url from that object "http://instagr.am/p/QC8hWKL_4K/" and get the link to just the image itself, not the image on the Instagram site. Anyone know how to do that? Can I even derive the that link from the url?
推荐答案
您可以通过将/media/
附加到URL来仅获取图像.使用您的示例: http://instagr.am/p/QC8hWKL_4K/media/.
You can get just the image by appending /media/
to the URL. Using your example: http://instagr.am/p/QC8hWKL_4K/media/.
您甚至可以指定大小
t(缩略图),m(中),l(大)之一.默认为m.
One of t (thumbnail), m (medium), l (large). Defaults to m.
对于缩略图: http://instagr.am/p/QC8hWKL_4K/media/?size = t
文档此处.
这篇关于我如何从Twitter实体获取直接的Instagram链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!