Merge branch 'kfchotspot' into 'master'
kfc hotspot fxcker Closes #7 See merge request laudom/librefi!2
This commit is contained in:
commit
5ad75cb94c
|
@ -2,6 +2,7 @@ from ._dummy import DummyFxcker
|
||||||
from .umwarszawa import UMWarszawaFxcker
|
from .umwarszawa import UMWarszawaFxcker
|
||||||
from .ledatel import LedatelFxcker
|
from .ledatel import LedatelFxcker
|
||||||
from .ipartners import IPartnersFxcker
|
from .ipartners import IPartnersFxcker
|
||||||
|
from .kfchotspot import KFCHotspotFxcker
|
||||||
from .justwifi import JustWifiFxcker
|
from .justwifi import JustWifiFxcker
|
||||||
|
|
||||||
fxckers_map = [
|
fxckers_map = [
|
||||||
|
@ -9,6 +10,7 @@ fxckers_map = [
|
||||||
(["UM-Warszawa"], UMWarszawaFxcker),
|
(["UM-Warszawa"], UMWarszawaFxcker),
|
||||||
(["Pendolino_WiFi"], LedatelFxcker),
|
(["Pendolino_WiFi"], LedatelFxcker),
|
||||||
(["McD-Hotspot"], IPartnersFxcker),
|
(["McD-Hotspot"], IPartnersFxcker),
|
||||||
|
(["KFC Hotspot"], KFCHotspotFxcker),
|
||||||
([
|
([
|
||||||
"Intercity_WiFi",
|
"Intercity_WiFi",
|
||||||
"_PKP_WIFI",
|
"_PKP_WIFI",
|
||||||
|
|
12
librefi/fxckers/kfchotspot.py
Normal file
12
librefi/fxckers/kfchotspot.py
Normal file
|
@ -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'<a href="([^"]+)" [^>]+id="accept-button">Chcę połączyć się',
|
||||||
|
splash.text)
|
||||||
|
self.request("GET", url)
|
||||||
|
return True
|
Loading…
Reference in a new issue