omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    How to do with webView..

    Pythonista
    3
    4
    770
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Raymond
      Raymond last edited by Raymond

      How can i do with webView:

      1- take download Requests from webView and download it in custom folder.

      2- Know what the Current web site is running now in the webView.

      And is there a way to get an javascript message from webView ?

      1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by JonB

        You should checkout @mikael's wkwebview which makes two way interactions in JavaScript easier(e.g., JavaScript can access python variables, etc. )

        You can use load_html instead load_url on the regular WebView to browse a requests response, if you originally made the get using requests.

        1 Reply Last reply Reply Quote 0
        • JonB
          JonB last edited by JonB

          To get current url from a regular WebView, usually this works

          w.eval_js('window.location')
          

          Also, another way to get page source would be

          w.eval_js('document.documentElement.outerHTML')
          
          COMPRARJAMONES 1 Reply Last reply Reply Quote 1
          • COMPRARJAMONES
            COMPRARJAMONES @JonB last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors