- FLX Remove web device that seem to be not working

- CR update client and header
This commit is contained in:
2026-03-31 10:51:24 +07:00
parent 4fff7cf20e
commit d6083f21b7
2 changed files with 17 additions and 32 deletions

View File

@@ -1,7 +1,7 @@
# Crunchyroll API Configuration
client:
id: "o7uowy7q4lgltbavyhjq"
secret: "lqrjETNx6W7uRnpcDm8wRVj8BChjC1er"
id: "y2arvjb0h0rgvtizlovy"
secret: "JVLvwdIpXvxU-qIBvT1M8oQTr1qlQJX2"
# API Endpoints
endpoints:
@@ -28,7 +28,7 @@ endpoints:
# Headers for Android TV client
headers:
user-agent: "Crunchyroll/ANDROIDTV/3.58.0_22336 (Android 11; en-US; SHIELD Android TV)"
user-agent: "Crunchyroll/ANDROIDTV/3.59.0_22338 (Android 12; en-US; SM-G9980)"
accept: "application/json"
accept-charset: "UTF-8"
accept-encoding: "gzip"
@@ -43,5 +43,5 @@ params:
# Device parameters for authentication
device:
type: "ANDROIDTV"
name: "SHIELD Android TV"
name: "p3q"
model: "SHIELD Android TV"

View File

@@ -23,10 +23,12 @@ class FLX(Service):
\b
Original-Author: [SeFree]
Version: 1.1.0
Authorization: Credentials + Cookies
Version: 1.0.0
Authorization: Cookies (No login require) + Credential (No need but can be provide)
Security: FHD@L3
\b
Notes:
- Dont care about account or vip. can bypass all content
"""
TITLE_RE = r"^(?:https?://(?:www\.)?flixerapp\.com/video/)?(?P<id>\d+)"
@@ -49,9 +51,6 @@ class FLX(Service):
help="BiliBili not provide Season in info, so specify it manually.")
@click.option("-m", "--movie", is_flag=True, default=False,
help="Download series as movie if listed as a series.)")
@click.option("-d", "--device_type", default='android', required=False, type=str,
help="Device type to use for API requests. Default is 'android'.")
@click.option("-c", "--cdn", default=None, required=False, type=str,
help="Overwrite CDN settings. Default is 'vps1'.")
@click.pass_context
@@ -66,7 +65,7 @@ class FLX(Service):
series_id = match.group("id")
return series_id
def __init__(self, ctx, title, original_lang, season,movie,device_type,cdn):
def __init__(self, ctx, title, original_lang, season,movie,cdn):
super().__init__(ctx)
self.title=self.parse_series_id(title)
@@ -74,7 +73,6 @@ class FLX(Service):
self.season = season
self.is_movie=movie
self.device_type = device_type
self.cdn=cdn
# def get_session(self):
@@ -85,32 +83,19 @@ class FLX(Service):
def authenticate(self, cookies=None, credential=None) -> None:
"""Authenticate using username and password credentials, with refresh token support."""
super().authenticate(cookies, credential)
if self.device_type == "android":
if credential:
data = f'screen-density=xhdpi&password={credential.password}&email={credential.username}'
# self.session.headers.update(self.config['headers'])
response = self.session.post(self.config['endpoints']['login'], headers=self.config['headers_android'], data=data)
elif self.device_type == "web":
files = {
'email': (None, credential.username),
'password': (None, credential.password),
'devicie_id': (None, 'web'),
'screen_density': (None, 'xxhdpi'),
'mac_address': (None, ''),
}
response=self.session.post(self.config['endpoints']['login'], files=files)
if response.status_code == 200 and response.json()['error_code'] == 110:
self.log.info("Login successful")
if response.status_code == 200 and response.json()['error_code'] == 110:
self.log.info("Login successful")
else:
self.log.error("Login failed. Please check credential")
exit(1)
else:
self.log.error("Login failed. Please check credential")
exit(1)
self.log.warning("Credential not found")
def get_titles(self) -> Titles_T:
response=self.session.get(self.config['endpoints']['info'].format(id=self.title)).json()