admin管理员组文章数量:1323035
I plan to make an Android mobile video streaming application. The videos are mostly hosted by Openload.co, so that the videos can open in a player on the mobile one must succeed in recovering the direct link of the video Openload. I need to code this in PHP. I tried to retrieve that in the source code of the page with a file_get_contents or a Curl, but nothing does. The file_get_contents and Curl do not load the page and its scripts before retrieving the source code. Except that the link of the video is a unique link. It changes every time the page is refreshed. The link is generated by javascript code.
An example, here is the embed link of the video: /
In the source code via inspect the item (or developer console I don't know, on your browser), you can see the line:
In this line is the id, date , IP and a token. (Example: z_wuuTTJSCg~1496728099~149.91.0.0~rIj0zw9c)
What is in this line is added to this link: / (example: openload.co/z_wuuTTJSCg~1496728099~149.91.0.0~rIj0zw9c)
and it's work like that.
If you look at the source code of this page directly with "view-source:" you will see that in the line designate there will be marked "HERE IS THE LINK".
I plan to make an Android mobile video streaming application. The videos are mostly hosted by Openload.co, so that the videos can open in a player on the mobile one must succeed in recovering the direct link of the video Openload. I need to code this in PHP. I tried to retrieve that in the source code of the page with a file_get_contents or a Curl, but nothing does. The file_get_contents and Curl do not load the page and its scripts before retrieving the source code. Except that the link of the video is a unique link. It changes every time the page is refreshed. The link is generated by javascript code.
An example, here is the embed link of the video: https://openload.co/embed/z_wuuTTJSCg/
In the source code via inspect the item (or developer console I don't know, on your browser), you can see the line:
In this line is the id, date , IP and a token. (Example: z_wuuTTJSCg~1496728099~149.91.0.0~rIj0zw9c)
What is in this line is added to this link: https://openload.co/stream/ (example: openload.co/z_wuuTTJSCg~1496728099~149.91.0.0~rIj0zw9c)
and it's work like that.
If you look at the source code of this page directly with "view-source:" you will see that in the line designate there will be marked "HERE IS THE LINK".
Share Improve this question edited Feb 8, 2019 at 21:26 user513951 13.8k7 gold badges70 silver badges89 bronze badges asked Jun 5, 2017 at 6:30 WaranoWarano 111 gold badge1 silver badge2 bronze badges2 Answers
Reset to default 1(function() {
'use strict';
alert("Subtitle File URL: "+suburl);
alert("Video File URL: https://openload.co/stream/"+document.getElementById("streamurl").innerHTML+"?mime=true");
})();
This is a function that runs after the OpenLoad page has gotten all the variables sorted out for you so you can just hotlink the video
If your application does not run the web page and only retrieves it (like cURL) the script that creates the valid token is on line 163 of the source code, right after script element
<script src="/assets/js/video-js/video.js.ol8.js"></script>
.
However it will require a large amount of time to understand how it is created and be able to replicate it.
Most easiest way to get openload link, just use youtube-dl cause you can't done that with PHP & JS
本文标签: javascriptGet the unique download link on OpenloadStack Overflow
版权声明:本文标题:javascript - Get the unique download link on Openload - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742108948a2421155.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论