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.
URL scheme is not working
-
When I am running below code under IOS 9.2, I can't make quora run:
import webbrowser
webbrowser.open('quora://')I tried 'quora://' in Launcher, it worked. So the URL should be right.
I remembered long ago(maybe IOS 8.x, not sure) the URL scheme worked.
I'm using Pythonista 1.5 on iPhone 6S.
Will anybody help? Thanks -
import webbrowser webbrowser.open('quora://')
Works as expected for me.
-
@ccc May I have your Pythonista version, IOS version and device type? Thanks
-
Pythonista version 1.6 (160037) on iOS 9.2 on an iPad3,4.
generated by https://github.com/cclauss/Ten-lines-or-less/blob/master/pythonista_version.py
-
@ccc Thanks. I tried the code on my friend's IOS9.2 IPhone, it also worked.
Tried to uninstall Pythonista and reinstall, with no luck. I even reseted my phone's settings, still with no luck.
Notice there is change on URL scheme on IOS9:Querying URL Schemes With canOpenURL.
With bellow code:import webbrowser print webbrowser.can_open('pythonista://') webbrowser.open('pythonista://')
I got False result to any known URLs. Seems the result matches with that been told in the link.
I remember I used a loop to check 'com.slovoed.api.%d' % i URL some time ago. This may cause False result of webbrowser.can_open(), but it should not cause webbrowser.open() fail. -
In version 1.5,
webbrowser.open()
usescan_open()
internally.can_open
is "throttled" on iOS 9, so if you previously used it in a loop, it's possible that Pythonista got "blacklisted", andcan_open()
always returnsFalse
– in which caseopen()
also fails. In the next update,can_open()
is deprecated, andopen()
should not be affected by this "blacklisting". -
@omz Thanks for the information. That should be the cause.