卷曲:发送请求就像浏览器一样

时间:2018-12-20 08:07:13

标签: linux google-chrome http curl

在Google上搜索电影院会在即时面板中返回将来的事件。例如,请参见下面的“放映时间”面板: enter image description here

我正在尝试使用curl提取Google实例信息。但是,似乎Google某种程度上认为这是一个漫游器,而不是真正的浏览器请求。 curl收到的响应将即时面板排除在外。这是我使用的curl调用:

    curl -H "DNT: 1" -H "UPGRADE-INSECURE-REQUESTS: 1" \
-H "Accept-Language: en-US,en;q=0.9,fa;q=0.8" \
-H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" \
-H "REFERER: https://www.google.com/" \
-H "X-ACCEL-INTERNAL: /internal-nginx-static-location" \
-H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" \
-v "https://www.google.com/search?q=rio+theatre&oq=rio+theatre&aqs=chrome..69i57j0l5.2382j1j7&sourceid=chrome&ie=UTF-8"

如何修改curl以检索与浏览器相同的信息?

0 个答案:

没有答案