Skip to content

Search Fails - Windows Scoop Install #28

@Jacques-Murray

Description

@Jacques-Murray

Metadata (please complete the following information)
Version: 1.8.0
OS: Windows 11
Movie: [e.g. endgame] (if applicable)

Describe the bug
flix-cli dune
╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ \scoop\apps\python\current\Lib\site-packages\flix_cli\core_flix_cli_.py:98 in search_content │
│ │
│ 95 │ try: │
│ 96 │ │ search_params = query.replace(" ", "-") │
│ 97 │ │ response = client.get(f"{FLIXHQ_SEARCH_URL}/{search_params}") │
│ ❱ 98 │ │ response.raise_for_status() │
│ 99 │ │ soup = BeautifulSoup(response.text, "html.parser") │
│ 100 │ │ items = soup.find_all("div", class_="flw-item") │
│ 101 │
│ │
│ ╭─────────────────────────────────────────────── locals ────────────────────────────────────────────────╮ │
│ │ client = <httpx.Client object at 0x0000022EA063BB10> │ │
│ │ err_msg = "Search failed: Server error '521 ' for url 'https://flixhq.to/search/dune'"+89 │ │
│ │ query = 'dune' │ │
│ │ response = <Response [521 ]> │ │
│ │ search_params = 'dune' │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ \AppData\Roaming\Python\Python314\site-packages\httpx_models.py:829 in raise_for_status │
│ │
│ 826 │ │ } │
│ 827 │ │ error_type = error_types.get(status_class, "Invalid status code") │
│ 828 │ │ message = message.format(self, error_type=error_type) │
│ ❱ 829 │ │ raise HTTPStatusError(message, request=request, response=self) │
│ 830 │ │
│ 831 │ def json(self, **kwargs: typing.Any) -> typing.Any: │
│ 832 │ │ return jsonlib.loads(self.content, **kwargs) │
│ │
│ ╭────────────────────────────────────────────────── locals ──────────────────────────────────────────────────╮ │
│ │ error_type = 'Server error' │ │
│ │ error_types = {1: 'Informational response', 3: 'Redirect response', 4: 'Client error', 5: 'Server error'} │ │
│ │ message = "Server error '521 ' for url 'https://flixhq.to/search/dune'\nFor more infor"+74 │ │
│ │ request = <Request('GET', 'https://flixhq.to/search/dune')> │ │
│ │ self = <Response [521 ]> │ │
│ │ status_class = 5 │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
HTTPStatusError: Server error '521 ' for url 'https://flixhq.to/search/dune'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/521

During handling of the above exception, another exception occurred:

╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ \scoop\apps\python\current\Lib\site-packages\flix_cli\core_flix_cli_.py:533 in main │
│ │
│ 530 │ │ ctx.query = " ".join(query) │
│ 531 │ │
│ 532 │ ctx.play_type = action │
│ ❱ 533 │ ctx.url, ctx.title, ctx.content_type = get_id(ctx) │
│ 534 │ │
│ 535 │ if ctx.content_type is None: │
│ 536 │ │ get_content_type(ctx) │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ action = <Action.PLAY: 'play'> │ │
│ │ client = <httpx.Client object at 0x0000022EA063BB10> │ │
│ │ ctx = Context( │ │
│ │ │ client=<httpx.Client object at 0x0000022EA063BB10>, │ │
│ │ │ query='dune', │ │
│ │ │ url=None, │ │
│ │ │ title=None, │ │
│ │ │ content_type=None, │ │
│ │ │ season=None, │ │
│ │ │ episodes=None, │ │
│ │ │ selected_media=None, │ │
│ │ │ selected_subtitles=[], │ │
│ │ │ dl_path=WindowsPath('/Downloads'), │ │
│ │ │ play_type=<Action.PLAY: 'play'> │ │
│ │ ) │ │
│ │ episodes = None │ │
│ │ headers = { │ │
│ │ │ 'User-Agent': 'flix-cli/1.8.1.16', │ │
│ │ │ 'Referer': 'https://flixhq.to/', │ │
│ │ │ 'X-Requested-With': 'XMLHttpRequest' │ │
│ │ } │ │
│ │ query = ['dune'] │ │
│ │ season = None │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ \scoop\apps\python\current\Lib\site-packages\flix_cli\core_flix_cli_.py:386 in get_id │
│ │
│ 383 def get_id(ctx: Context) -> tuple[str, str, MediaType | None]: │
│ 384 │ """Search and select content""" │
│ 385 │ assert ctx.query is not None │
│ ❱ 386 │ selected_url, title = search_content(ctx.query, ctx.client) │
│ 387 │ │
│ 388 │ if "/movie/" in selected_url: │
│ 389 │ │ content_type = MediaType.MOVIE │
│ │
│ ╭─────────────────────────── locals ────────────────────────────╮ │
│ │ ctx = Context( │ │
│ │ │ client=<httpx.Client object at 0x0000022EA063BB10>, │ │
│ │ │ query='dune', │ │
│ │ │ url=None, │ │
│ │ │ title=None, │ │
│ │ │ content_type=None, │ │
│ │ │ season=None, │ │
│ │ │ episodes=None, │ │
│ │ │ selected_media=None, │ │
│ │ │ selected_subtitles=[], │ │
│ │ │ dl_path=WindowsPath('/Downloads'), │ │
│ │ │ play_type=<Action.PLAY: 'play'> │ │
│ │ ) │ │
│ ╰───────────────────────────────────────────────────────────────╯ │
│ │
│ \scoop\apps\python\current\Lib\site-packages\flix_cli\core_flix_cli_.py:149 in search_content │
│ │
│ 146 │ │
│ 147 │ except Exception as e: │
│ 148 │ │ err_msg = f"Search failed: {e}" │
│ ❱ 149 │ │ raise RuntimeError(err_msg) │
│ 150 │
│ 151 │
│ 152 def get_tv_seasons(media_id: str, client: httpx.Client) -> list[dict[str, str]]: │
│ │
│ ╭─────────────────────────────────────────────── locals ────────────────────────────────────────────────╮ │
│ │ client = <httpx.Client object at 0x0000022EA063BB10> │ │
│ │ err_msg = "Search failed: Server error '521 ' for url 'https://flixhq.to/search/dune'"+89 │ │
│ │ query = 'dune' │ │
│ │ response = <Response [521 ]> │ │
│ │ search_params = 'dune' │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
RuntimeError: Search failed: Server error '521 ' for url 'https://flixhq.to/search/dune'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/521
Steps To Reproduce

  1. Run flix-cli <any movie>

Expected behavior
Playback should work

Screenshots (if applicable; you can just drag the image onto github)

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions