Update afreecaTV.py (#182)
This commit is contained in:
1 parent
3a581627e7
commit
dc8207aad3
1 file changed
+4
-6
@@ -4,10 +4,10 @@ from ..engine.decorators import Plugin
|
||||
from ..plugins import match1, logger
|
||||
from ..engine.download import DownloadBase
|
||||
|
||||
VALID_URL_BASE = r"https?://(.*?)\.afreecatv\.com/(?P<username>\w+)(?:/\d+)?"
|
||||
|
||||
# VALID_URL_BASE = r"https?://(.*?)\.afreecatv\.com/(?P<username>\w+)(?:/\d+)?"
|
||||
VALID_URL_BASE = r"https?://play\.afreecatv\.com/(?P<username>\w+)(?:/\d+)?"
|
||||
STREAM_INFO_URLS = "{rmd}/broad_stream_assign.html"
|
||||
CHANNEL_API_URL = "http://live.afreecatv.com:8057/afreeca/player_live_api.php"
|
||||
CHANNEL_API_URL = "http://live.afreecatv.com/afreeca/player_live_api.php"
|
||||
|
||||
QUALITIES = ["original", "hd", "sd"]
|
||||
|
||||
@@ -20,10 +20,8 @@ class AfreecaTV(DownloadBase):
|
||||
def check_stream(self):
|
||||
logger.debug(self.fname)
|
||||
username = match1(self.url, VALID_URL_BASE)
|
||||
res_bno = requests.post(CHANNEL_API_URL, data={"bid": username, "mode": "landing", "player_type": "html5"},
|
||||
timeout=5)
|
||||
res_bno = requests.post(CHANNEL_API_URL + "?bjid=" + username,data={"bid": username, "mode": "landing", "player_type": "html5"},timeout=5)
|
||||
res_bno.close()
|
||||
|
||||
if res_bno.json()["CHANNEL"]["RESULT"] == 0:
|
||||
return
|
||||
bno = res_bno.json()["CHANNEL"]["BNO"]
|
||||
|
||||
Reference in new issue
Block a user