donglu3243 2015-08-20 12:37
浏览 62
已采纳

网络刮刮谷歌电影与Goutte / Guzzle:“地区”问题

I created a simple webscrapper with Goutte to grab some movie showtimes for some application. I use this king of URL, for instance : http://www.google.fr/movies?view=list&date=3&tid=4f451a87a71bfa51.

The code isn't working on my production server, and I finally noticed that Google Movies won't show the results depending on the requester location. The theatre is in France, and it's obviously working from this country, and from Germany too as far I can see, but not from Netherlands, which is my production server location.

Has anybody encountered a problem like this one? I think I could resolve this with a proxy, but it seems a little complicated (do I have to set up a new server in France just for this purpose?); maybe there's a way to tweak the HTTP request made to Google Movies?

Thanks in advance.

  • 写回答

1条回答 默认 最新

  • dougu2006 2015-08-26 11:42
    关注

    Okaaay, I found it. The trick is to add a "near" param in the querystring, with a country or region name. Seems that the "tid" isn't enough to identify the theatre.

    Hope this will help someone.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于大棚监测的pcb板设计
  • ¥20 sim800c模块 at指令及平台
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计