【问题标题】:CURL: grabbing liveleak videoCURL:抓取直播视频
【发布时间】:2012-08-28 02:15:45
【问题描述】:

我可以使用 curl 抓取视频吗? 我正在使用一个网站从 liveleak 下载视频,但它停止工作。我的一个脚本需要这个。

基本上这是链接: http://www.liveleak.com/e/955_1345380192

重定向到此 http://edge.liveleak.com/80281E/u/u/ll2_player_files/mp55/player.swf?config=http://www.liveleak.com/player?a=config%26item_token=955_1345380192%26embed=1%26extra_params=

该 conf 链接包含视频链接。每次我尝试下载它,我得到 --->确保设置了file_url、file_token 或playlist_token! http://www.liveleak.com/player?a=config%26item_token=955_1345380192%26embed=1%26extra_params=

到目前为止我尝试过的:

    curl http://edge.liveleak.com/80281E/u/u/ll2_player_files/mp55/player.swf?config=http://www.liveleak.com/player?a=config%26item_token=955_1345380192%26embed=1%26extra_params= -s -L -b LCOOKIE -c LCOOKIE -o LIVE

    curl http://edge.liveleak.com/80281E/u/u/ll2_player_files/mp55/player.swf?config=http://www.liveleak.com/player?a=config%26item_token=955_1345380192%26embed=1%26extra_params= -I

    curl http://edge.liveleak.com/80281E/u/u/ll2_player_files/mp55/player.swf?config=http://www.liveleak.com/player?a=config%26item_token=955_1345380192%26embed=1%26extra_params= -v

    curl http://www.liveleak.com/player?a=config&item_token=955_1345380192&embed=1&extra_params=

    wget http://www.liveleak.com/player?a=config&item_token=955_1345380192&embed=1&extra_params=

curl  -A "Mozilla/5.0 (X11; U; Linux x86_64; ru; rv:1.9.2.15) Gecko/20110303 Ubuntu/10.10 (maverick) Firefox/3.6.15" http://www.liveleak.com/player?a=config&item_token=955_1345380192&embed=1&extra_params=

【问题讨论】:

    标签: linux bash curl wget


    【解决方案1】:

    这是你史诗般的单线:

    UA="Mozilla/5.0 (X11; U; Linux x86_64; ru; rv:1.9.2.15) Gecko/20110303 Ubuntu/10.10 (maverick) Firefox/3.6.15"; curl -A "$UA" $(sed -n -e 's/.*<file>\(.*\)<\/file>.*/\1/p' <(wget -q -O - $(wget -U "$UA" -nv -r -np -nd -H --spider "http://www.liveleak.com/e/955_1345380192" 2>&1 | egrep ' URL:' | awk '{print $4}' | sed "s/.*\?config\=//g" | sed -e's/%\([0-9A-F][0-9A-F]\)/\\\\\x\1/g' | xargs echo -e)))
    

    根据要求,它使用 curl(以及一些额外的工具);有关说明,请参阅 bash 手册和其他命令的文档。

    简短摘要:他们在 xml 文件中移动了有关视频的信息。为了下次轻松使用最新的 Firefox,它能够监视所有 HTTP 请求并记录其内容(无需附加组件!)

    【讨论】:

      猜你喜欢
      • 2011-03-12
      • 1970-01-01
      • 2017-05-27
      • 2023-04-05
      • 1970-01-01
      • 2018-03-12
      • 1970-01-01
      • 2013-01-02
      相关资源
      最近更新 更多