Pythonista-Issues
Pythonista-Issues copied to clipboard
Not block websites
Hi, Pythonista doesn't block restricted websites from "content restrictions". So you can download any forbidden content with modules such as requests and others.
System Information
- Pythonista 3.3 (330025)
- IOS 14.2
- iPhone 11
Like parental controls? https://support.mozilla.org/en-US/kb/block-and-unblock-websites-parental-controls-firef
Yes, like parental controls.
Does Python on Linux, macOS, or Windows support such a feature?
@cclauss macOS and iOS have built-in parental controls that let you block certain websites (or only allow a specific list of websites). I think the complaint here is that Pythonista ignores these restrictions.
As far as I know, the iOS website restrictions affect Safari, web views, and all code that uses Apple's APIs for making web requests (like NSURLSession
). All major Python HTTP libraries are built on top of low-level socket
APIs, which aren't affected by these restrictions as far as I know.
There's probably no good way to fix this. Even if you reimplement all modules like urllib
and requests
on top of the Apple APIs (which would probably be quite difficult), the socket
module would still be available. Blocking the socket
module completely would limit Pythonista's functionality quite a bit, even for users who don't use the iOS website restriction features.
Are we agreed that if Python on macOS does not block such sites then there should be no expectation that Python on iOS should block them either? Should this issue be closed?
Agreed.