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.


    Help , I'm unable to assign proxies to multiple webbrowser tabs :(

    Pythonista
    3
    6
    1783
    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.
    • ovrnghtshft
      ovrnghtshft last edited by

      I'd like to assign proxies to open with multiple tabs, but it's only using my ip on my phone. I'm fairly new to python, and I've attempted to look up how to do this, but I guess what's out there isn't directly answering what I want to know, if that makes sense. Any help would be GREATLY APPRECIATED!!!! I'm open to also changing the entire code if need be.

      import webbrowser

      proxies = :{

      'https' : ' xxx.xxx.xxx.xxx.:xxxx', xxx.xxx.xxx.xxx.:xxxx
      }

      url = ('httpsbin.org/ip')
      url1 = ('httpsbin.org/ip')
      url2 = ('httpsbin.org/ip')

      webbroswer.open(url, proxies)
      webbroswer.open_new_tab(url1, proxies)
      webbroswer.open_new_tab(url2, proxies)

      I even tried using proxies=proxies instead of just "proxies"

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

        I don't think webbrowser has proxy support. See https://forum.omz-software.com/topic/3708/use-objc_util-and-nsurlconnection-to-make-a-get-request/5 for a way to use lower level requests.

        From what I read, WKWebView cannot be made to use an NSUrlSession, but maybe @mikael knows. You could probably implement a callback that uses the above retrieve the content, then uses load_html to display.
        @mikael, does WKWebView support

        ovrnghtshft 1 Reply Last reply Reply Quote 0
        • mikael
          mikael @ovrnghtshft last edited by

          @ovrnghtshft, I have not found any new possibilities beyond what @JonB said.

          Just checking: have you tried setting proxies globally in iOS settings, or is that not appropriate for your use case?

          ovrnghtshft 2 Replies Last reply Reply Quote 1
          • ovrnghtshft
            ovrnghtshft @JonB last edited by

            @JonB Thanks for the info, I'll definitely be looking into this!!

            1 Reply Last reply Reply Quote 0
            • ovrnghtshft
              ovrnghtshft @mikael last edited by ovrnghtshft

              @mikael No I haven't tried that, but will it allow me to rotate or assign the proxies to separate tabs? Also, will that work w/ webbrowser? I'll definitely give it a try! Thanks again for the insight/input! If you happen to have any examples, please point me to them.

              1 Reply Last reply Reply Quote 0
              • ovrnghtshft
                ovrnghtshft @mikael last edited by

                @mikael okay, that worked perfectly with webbroswer, now i just need to figure out if I can assign multiple proxies..thanks again!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Powered by NodeBB Forums | Contributors