Heim  >  Artikel  >  Backend-Entwicklung  >  javascript - 如何抓取优酷视频的评论内容

javascript - 如何抓取优酷视频的评论内容

WBOY
WBOYOriginal
2016-06-06 20:42:20963Durchsuche

比如2014苹果秋季发布会中文视频:iPad Air 2 1017 这个链接评论内容,本以为解析源代码的标签就可以,但是源代码里没有找到对应的HTML元素,用file_get_contentscurl直接404,有什么方法可以获取?

回复内容:

比如2014苹果秋季发布会中文视频:iPad Air 2 1017 这个链接评论内容,本以为解析源代码的标签就可以,但是源代码里没有找到对应的HTML元素,用file_get_contentscurl直接404,有什么方法可以获取?

http://comments.youku.com/comments/~ajax/vpcommentContent.html?__ap=%7B%22videoid%22:%22201269103%22,%22sid%22:%22720101079%22,%22page%22:1,%22commentSid%22:%22%22,%22showid%22:%220%22%7D&__ai=&__callback=displayComments

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn