librefi/librefi/fxckers/kfchotspot.py

13 lines
383 B
Python

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'<a href="([^"]+)" [^>]+id="accept-button">Chcę połączyć się',
splash.text)
self.request("GET", url)
return True