为什么链接只能在MacOS操作系统上工作 [英] Why is link only working from macos operating system
问题描述
我抓取了一个链接,并在macOS上的chrome/safari/firefox上完美运行,获取了资源,但是当从其他操作系统(例如Windows或android)使用相同的链接时,浏览器中出现404错误.
I scraped a link and it works perfectly on chrome / safari / firefox at macos getting the ressource but when the same link is used from another operating system like windows or android I get a 404 error in the browser.
示例链接为:
https://p18d1c9b884-6b67-4bc4-8b38-7fe101682ea8.hdfilme.ws/hls/b74ec1eb98c4b214199fb328d53ed255/b74ec1eb98c4b214199fb328d53ed255-0.png?msKey=S9
它是m3u8文件的一部分,可以在以下位置找到
It is part of a m3u8 file, which can be found under:
https://load.hdfilme.ws/hls/b74ec1eb98425533283
它与会话无关,因为即使在私有模式或curl中,macos始终可以使用它.
It has nothing to do with session because it is always available from macos even in private mode or curl.
任何人都有暗示或提示可能是什么原因?
Anyone has a hint or tip what could be causing that?
推荐答案
我无法告诉您它为什么以及是否在macos上运行,因为我只有一个Windows系统可以测试,但是我可以告诉您为什么它不能在macOS上运行在Windows上运行.
I can not tell you why and if it is running on macos, since I only got a windows system to test, but I can tell you why it is not running on windows.
因此,我测试了提供的两个链接,但无法打开第二个链接.我得到了您描述的相同错误.我研究了其他链接,并观看了源页面的网络流量.因此,无法访问页面的原因是您的请求中缺少标题选项.
您需要添加Headeroption 'referer: https://hdfilme.cx/filme1/21-bridges-13297-stream/deutsch'
So I tested both links provided and couldn´t open the second one. I got the same error described by you. I investigated the other link and watched the networktraffic of the source page. So the reason why you can not access the page is you are missing a headers option in your request.
You need to add the Headeroption 'referer: https://hdfilme.cx/filme1/21-bridges-13297-stream/deutsch'
将该选项添加到请求中后,您可以访问后面的资源.例如,您可以使用以下命令:curl 'https://p18d1c9b884-6b67-4bc4-8b38-7fe101682ea8.hdfilme.ws/hls/b74ec1eb98c4b214199fb328d53ed255/b74ec1eb98c4b214199fb328d53ed255-0.png?msKey=S9' -H 'referer: https://hdfilme.cx/filme1/21-bridges-13297-stream/deutsch' --output 0.png
With that option added to a request you can access the ressource behind. For example you can use the following command: curl 'https://p18d1c9b884-6b67-4bc4-8b38-7fe101682ea8.hdfilme.ws/hls/b74ec1eb98c4b214199fb328d53ed255/b74ec1eb98c4b214199fb328d53ed255-0.png?msKey=S9' -H 'referer: https://hdfilme.cx/filme1/21-bridges-13297-stream/deutsch' --output 0.png
使用该命令,您将下载第一个PNG文件.
With that command you would get the first PNG file downloaded.
这篇关于为什么链接只能在MacOS操作系统上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!