From 61e413d85d2bcd057f7969f8a5006f42f68e32f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 21 Jun 2019 20:03:14 +0200 Subject: [PATCH] [hentaifoundry] stop disabling IPv6 addresses The rogue address mentioned in a138d58 is no longer included in the DNS results for www.hentai-foundry.com. --- gallery_dl/extractor/hentaifoundry.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/gallery_dl/extractor/hentaifoundry.py b/gallery_dl/extractor/hentaifoundry.py index 1a6bfa5a..d31f66f4 100644 --- a/gallery_dl/extractor/hentaifoundry.py +++ b/gallery_dl/extractor/hentaifoundry.py @@ -10,8 +10,6 @@ from .common import Extractor, Message from .. import text, util, exception -import requests.packages.urllib3.util.connection as u3_conn -import socket class HentaifoundryExtractor(Extractor): @@ -30,10 +28,6 @@ class HentaifoundryExtractor(Extractor): self.start_post = 0 self.start_page = text.parse_int(page, 1) - def request(*args, **kwargs): - with disable_ipv6(): - return Extractor.request(*args, **kwargs) - def items(self): data = self.get_job_metadata() yield Message.Version, 1 @@ -268,14 +262,3 @@ class HentaifoundryImageExtractor(HentaifoundryExtractor): def skip(self, _): return 0 - - -class disable_ipv6(): - """Context Manager: Reject IPv6 addresses during DNS lookup""" - _allowed_gai_family = u3_conn.allowed_gai_family - - def __enter__(self): - u3_conn.allowed_gai_family = lambda: socket.AF_INET - - def __exit__(self, etype, value, traceback): - u3_conn.allowed_gai_family = disable_ipv6._allowed_gai_family