Index: filters/get_subscriptions.py |
=================================================================== |
--- a/filters/get_subscriptions.py |
+++ b/filters/get_subscriptions.py |
@@ -13,19 +13,19 @@ |
# You should have received a copy of the GNU General Public License |
# along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
import codecs |
import os |
import tarfile |
import urllib |
-from sitescripts.subscriptions.subscriptionParser import parse_file, calculate_supplemented |
+def get_subscriptions(_): |
+ from sitescripts.subscriptions.subscriptionParser import parse_file, calculate_supplemented |
-def get_subscriptions(_): |
result = {} |
utf8_reader = codecs.getreader('utf8') |
source = urllib.urlopen("https://hg.adblockplus.org/subscriptionlist/archive/default.tar.gz") |
try: |
with tarfile.open(fileobj=source, mode="r|gz") as archive: |
for fileinfo in archive: |
if os.path.splitext(fileinfo.name)[1] != ".subscription": |
continue |