diff --git a/librefi/fxckers/_map.py b/librefi/fxckers/_map.py index e418924..1dbce81 100644 --- a/librefi/fxckers/_map.py +++ b/librefi/fxckers/_map.py @@ -2,10 +2,12 @@ from ._dummy import DummyFxcker from .umwarszawa import UMWarszawaFxcker from .ledatel import LedatelFxcker from .ipartners import IPartnersFxcker +from .kfchotspot import KFCHotspotFxcker fxckers_map = [ ([r"re:MZK Opole \d{3}(?: (?:2.4|5)GHz)?"], DummyFxcker), (["UM-Warszawa"], UMWarszawaFxcker), (["Pendolino_WiFi"], LedatelFxcker), (["McD-Hotspot"], IPartnersFxcker), + (["KFC Hotspot"], KFCHotspotFxcker), ] diff --git a/librefi/fxckers/kfchotspot.py b/librefi/fxckers/kfchotspot.py new file mode 100644 index 0000000..1bca3d3 --- /dev/null +++ b/librefi/fxckers/kfchotspot.py @@ -0,0 +1,12 @@ +from ._common import BaseFxcker +from ..utils import regex_search_string + + +class KFCHotspotFxcker(BaseFxcker): + def unfxck(self, location): + splash = self.request("GET", location) + url = regex_search_string( + r']+id="accept-button">Chcę połączyć się', + splash.text) + self.request("GET", url) + return True