douhui1630 2015-01-09 17:59
浏览 39

从facebook专辑中获取完整的HTML代码

I'm trying to get the html code from an album of facebook,once done that i want to extract the photo links, but as we know all the photos are not loaded at once but as you scroll down.

When i use cURL it get only those links of the photos which are loaded at first.

Will there be a way to get the whole loaded html code through php?

Please bear with my english.

Thanks

EDIT: Well i was wanting to do the same on any page which have this kind of behavior not only on facebook. Thanks anyway

  • 写回答

1条回答 默认 最新

  • duanfa2014 2015-01-09 18:04
    关注

    You will not be able to reliably fetch an album from Facebook via this method.

    There are a small amount of photos sent with the original request and the rest are loaded via ajax. Using curl, there is no way that I am aware of to simulate the events that lead to said ajax load. You could call the original, and then subsequently call the other ajax endpoints but this method is likely to break the second fb changes anything.

    As ceejayoz said, you should be using the fb api for this sort of thing.

    评论

报告相同问题?

悬赏问题

  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测