为什么在linkedin.com上发布的图像与通过API发布时的图像不同?

时间:2014-11-30 16:53:36

标签: linkedin

当我通过linkedin.com网站发布分享然后获取其属性并再次从API分享时,图片看起来不一样。

以下是一个示例,从网络界面共享底部帖子,然后从API共享顶部帖子: Screenshot of 2 LinkedIN posts with identical attributes. Top was posted via API, bottom was posted on linkedin.com

这些帖子的属性完全相同。以下是通过LinkedIn.com分享的帖子的JSON属性:

"comment"=>"Test1",
"content"=>
{"description"=>"",
"eyebrow_url"=>
"http://image-store.slidesharecdn.com/47dc092f-2411-4490-b8f0-8f5e587d1857-large.png",
"shortened_url"=>
"http://image-store.slidesharecdn.com/47dc092f-2411-4490-b8f0-8f5e587d1857-large.png",
"submitted_image_url"=>
"http://image-store.slidesharecdn.com/47dc092f-2411-4490-b8f0-8f5e587d1857-large.png",
"submitted_url"=>
"http://image-store.slidesharecdn.com/47dc092f-2411-4490-b8f0-8f5e587d1857-large.png",
"thumbnail_url"=>
"https://media.licdn.com/media-proxy/ext?w=80&h=100&hash=83SZltJ4k6E4eW%2B%2B%2F4R86FIVsLU%3D&url=http%3A%2F%2Fimage-store.slidesharecdn.com%2F47dc092f-2411-4490-b8f0-8f5e587d1857-large.png",
"title"=>"Screen Shot 2014-11-13 at 3.37.02 PM.png"},

通过REST API共享帖子的属性:

"comment"=>"Test1",
"content"=>
{"description"=>" ",
"eyebrow_url"=>
"http://image-store.slidesharecdn.com/47dc092f-2411-4490-b8f0-8f5e587d1857-large.png",
"shortened_url"=>
"http://image-store.slidesharecdn.com/47dc092f-2411-4490-b8f0-8f5e587d1857-large.png",
"submitted_image_url"=>
"http://image-store.slidesharecdn.com/47dc092f-2411-4490-b8f0-8f5e587d1857-large.png",
"submitted_url"=>
"http://image-store.slidesharecdn.com/47dc092f-2411-4490-b8f0-8f5e587d1857-large.png",
"thumbnail_url"=>
"https://media.licdn.com/media-proxy/ext?w=80&h=100&hash=83SZltJ4k6E4eW%2B%2B%2F4R86FIVsLU%3D&url=http%3A%2F%2Fimage-store.slidesharecdn.com%2F47dc092f-2411-4490-b8f0-8f5e587d1857-large.png",
"title"=>"Screen Shot 2014-11-13 at 3.37.02 PM.png"},

以下是用于通过API创建帖子的HTTP请求:

HTTP POST (935.00ms) https://api.linkedin.com:443/v1/people/~/shares
Request body {"visibility":{"code":"anyone"},"comment":"Test1","content":{"description":"","submitted_image_url":"http://image-store.slidesharecdn.com/47dc092f-2411-4490-b8f0-8f5e587d1857-large.png","submitted_url":"http://image-store.slidesharecdn.com/47dc092f-2411-4490-b8f0-8f5e587d1857-large.png","title":"Screen Shot 2014-11-13 at 3.37.02 PM.png
"}}

这是API中的错误还是LinkedIN处理API与Web界面共享的方式之间的区别?有解决方法吗?

1 个答案:

答案 0 :(得分:0)

Share API调用目前尚未通过同一个抓取工具界面进行处理,该界面也是通过linkedin.com进行的分享。

通过API共享时,它仅使用作为API请求的一部分直接提供的信息。通过网站,爬虫脚本会尝试自动分析目标页面以获取必要的信息。