Giter VIP home page Giter VIP logo

Comments (3)

youlookwhat avatar youlookwhat commented on July 28, 2024

没有现成的方法,不过你可以按照下面的示例去得到链接中的视频url(将"img"换为"video"),不过只适用于很简答的视频网页,你给的那个链接不适用。

/**
* 前端注入JS:
* 这段js函数的功能就是,遍历所有的img节点,并添加onclick函数,函数的功能是在图片点击的时候调用本地java接口并传递url过去
*/
private void loadImageClickJs() {
byWebView.getLoadJsHolder().loadJs("javascript:(function(){" +
"var objs = document.getElementsByTagName("img");" +
"for(var i=0;i<objs.length;i++)" +
"{" +
"objs[i].onclick=function(){window.injectedObject.imageClick(this.getAttribute("src"));}" +
"}" +
"})()");
}

from bywebview.

dongbeicxy avatar dongbeicxy commented on July 28, 2024

请问有些根据url获取视频链接的app的实现原理是什么呢?用python?

from bywebview.

youlookwhat avatar youlookwhat commented on July 28, 2024

具体我也不太了解,如果确定播放时是一个链接的话,就看怎么得到了,可以用python或其他方式抓包。
不过有可能播放是一个视频id,通过sdk播放的,这个要看具体情况饿了。

from bywebview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.