File: 0001-Remove-deezer.patch

package info (click to toggle)
streamrip 2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,596 kB
  • sloc: python: 6,419; makefile: 5
file content (576 lines) | stat: -rw-r--r-- 22,005 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
From: "Dr. Tobias Quathamer" <toddy@debian.org>
Date: Mon, 15 Dec 2025 10:09:20 +0100
Subject: Remove deezer

Forwarded: not-needed
---
 poetry.lock                  |  12 ---
 pyproject.toml               |   1 -
 streamrip/client/__init__.py |   2 -
 streamrip/client/deezer.py   | 246 -------------------------------------------
 streamrip/rip/main.py        |   3 +-
 streamrip/rip/prompter.py    |  44 +-------
 tests/test_deezer.py         | 145 -------------------------
 tests/test_error_handling.py |   1 -
 8 files changed, 2 insertions(+), 452 deletions(-)
 delete mode 100644 streamrip/client/deezer.py
 delete mode 100644 tests/test_deezer.py

diff --git a/poetry.lock b/poetry.lock
index e1814bd..23e16b5 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -502,18 +502,6 @@ files = [
     {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
 ]
 
-[[package]]
-name = "deezer-py"
-version = "1.3.6"
-description = "A wrapper for all Deezer's APIs"
-optional = false
-python-versions = ">=3.6"
-groups = ["main"]
-files = [
-    {file = "deezer-py-1.3.6.tar.gz", hash = "sha256:a3ef151f7971d69769e7393f71373eaf896bccd22167213872ae46e04e14a2d7"},
-    {file = "deezer_py-1.3.6-py3-none-any.whl", hash = "sha256:e1dcb137246cfd009400657ec07d7269a491dace210a496fe73d0e18e4690206"},
-]
-
 [package.dependencies]
 requests = "*"
 
diff --git a/pyproject.toml b/pyproject.toml
index c18eb67..f90817e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -27,7 +27,6 @@ simple-term-menu = { version = "^1.2.1", platform = 'darwin|linux' }
 pick = { version = "^2", platform = 'win32|cygwin' }
 windows-curses = { version = "^2.2.0", platform = 'win32|cygwin' }
 Pillow = ">=9,<11"
-deezer-py = "1.3.6"
 pycryptodomex = "^3.10.1"
 appdirs = "^1.4.4"
 m3u8 = "^0.9.0"
diff --git a/streamrip/client/__init__.py b/streamrip/client/__init__.py
index 4e5dd8c..7b3ea6b 100644
--- a/streamrip/client/__init__.py
+++ b/streamrip/client/__init__.py
@@ -1,5 +1,4 @@
 from .client import Client
-from .deezer import DeezerClient
 from .downloadable import BasicDownloadable, Downloadable
 from .qobuz import QobuzClient
 from .soundcloud import SoundcloudClient
@@ -7,7 +6,6 @@ from .tidal import TidalClient
 
 __all__ = [
     "Client",
-    "DeezerClient",
     "TidalClient",
     "QobuzClient",
     "SoundcloudClient",
diff --git a/streamrip/client/deezer.py b/streamrip/client/deezer.py
deleted file mode 100644
index 056463f..0000000
--- a/streamrip/client/deezer.py
+++ /dev/null
@@ -1,246 +0,0 @@
-import asyncio
-import binascii
-import hashlib
-import logging
-
-import deezer
-from Cryptodome.Cipher import AES
-
-from ..config import Config
-from ..exceptions import (
-    AuthenticationError,
-    MissingCredentialsError,
-    NonStreamableError,
-)
-from .client import Client
-from .downloadable import DeezerDownloadable
-
-logger = logging.getLogger("streamrip")
-logging.captureWarnings(True)
-
-
-class DeezerClient(Client):
-    """Client to handle deezer API. Does not do rate limiting.
-
-    Attributes:
-        global_config: Entire config object
-        client: client from deezer py used for API requests
-        logged_in: True if logged in
-        config: deezer local config
-        session: aiohttp.ClientSession, used only for track downloads not API requests
-
-    """
-
-    source = "deezer"
-    max_quality = 2
-
-    def __init__(self, config: Config):
-        self.global_config = config
-        self.client = deezer.Deezer()
-        self.logged_in = False
-        self.config = config.session.deezer
-
-    async def login(self):
-        # Used for track downloads
-        self.session = await self.get_session(
-            verify_ssl=self.global_config.session.downloads.verify_ssl
-        )
-        arl = self.config.arl
-        if not arl:
-            raise MissingCredentialsError
-        success = self.client.login_via_arl(arl)
-        if not success:
-            raise AuthenticationError
-        self.logged_in = True
-
-    async def get_metadata(self, item_id: str, media_type: str) -> dict:
-        # TODO: open asyncio PR to deezer py and integrate
-        if media_type == "track":
-            return await self.get_track(item_id)
-        elif media_type == "album":
-            return await self.get_album(item_id)
-        elif media_type == "playlist":
-            return await self.get_playlist(item_id)
-        elif media_type == "artist":
-            return await self.get_artist(item_id)
-        else:
-            raise Exception(f"Media type {media_type} not available on deezer")
-
-    async def get_track(self, item_id: str) -> dict:
-        try:
-            item = await asyncio.to_thread(self.client.api.get_track, item_id)
-        except Exception as e:
-            raise NonStreamableError(e)
-
-        album_id = item["album"]["id"]
-        try:
-            album_metadata, album_tracks = await asyncio.gather(
-                asyncio.to_thread(self.client.api.get_album, album_id),
-                asyncio.to_thread(self.client.api.get_album_tracks, album_id),
-            )
-        except Exception as e:
-            logger.error(f"Error fetching album of track {item_id}: {e}")
-            return item
-
-        album_metadata["tracks"] = album_tracks["data"]
-        album_metadata["track_total"] = len(album_tracks["data"])
-        item["album"] = album_metadata
-
-        return item
-
-    async def get_album(self, item_id: str) -> dict:
-        album_metadata, album_tracks = await asyncio.gather(
-            asyncio.to_thread(self.client.api.get_album, item_id),
-            asyncio.to_thread(self.client.api.get_album_tracks, item_id),
-        )
-        album_metadata["tracks"] = album_tracks["data"]
-        album_metadata["track_total"] = len(album_tracks["data"])
-        return album_metadata
-
-    async def get_playlist(self, item_id: str) -> dict:
-        pl_metadata, pl_tracks = await asyncio.gather(
-            asyncio.to_thread(self.client.api.get_playlist, item_id),
-            asyncio.to_thread(self.client.api.get_playlist_tracks, item_id),
-        )
-        pl_metadata["tracks"] = pl_tracks["data"]
-        pl_metadata["track_total"] = len(pl_tracks["data"])
-        return pl_metadata
-
-    async def get_artist(self, item_id: str) -> dict:
-        artist, albums = await asyncio.gather(
-            asyncio.to_thread(self.client.api.get_artist, item_id),
-            asyncio.to_thread(self.client.api.get_artist_albums, item_id),
-        )
-        artist["albums"] = albums["data"]
-        return artist
-
-    async def search(self, media_type: str, query: str, limit: int = 200) -> list[dict]:
-        # TODO: use limit parameter
-        if media_type == "featured":
-            try:
-                if query:
-                    search_function = getattr(self.client.api, f"get_editorial_{query}")
-                else:
-                    search_function = self.client.api.get_editorial_releases
-            except AttributeError:
-                raise Exception(f'Invalid editorical selection "{query}"')
-        else:
-            try:
-                search_function = getattr(self.client.api, f"search_{media_type}")
-            except AttributeError:
-                raise Exception(f"Invalid media type {media_type}")
-
-        response = search_function(query, limit=limit)  # type: ignore
-        if response["total"] > 0:
-            return [response]
-        return []
-
-    async def get_downloadable(
-        self,
-        item_id: str,
-        quality: int = 2,
-        is_retry: bool = False,
-    ) -> DeezerDownloadable:
-        if item_id is None:
-            raise NonStreamableError(
-                "No item id provided. This can happen when searching for fallback songs.",
-            )
-        # TODO: optimize such that all of the ids are requested at once
-        dl_info: dict = {"quality": quality, "id": item_id}
-
-        track_info = self.client.gw.get_track(item_id)
-
-        fallback_id = track_info.get("FALLBACK", {}).get("SNG_ID")
-
-        quality_map = [
-            (9, "MP3_128"),  # quality 0
-            (3, "MP3_320"),  # quality 1
-            (1, "FLAC"),  # quality 2
-        ]
-        size_map = [
-            int(track_info.get(f"FILESIZE_{format}", 0)) for _, format in quality_map
-        ]
-        dl_info["quality_to_size"] = size_map
-        
-        # Check if requested quality is available
-        if size_map[quality] == 0:
-            if self.config.lower_quality_if_not_available:
-                # Fallback to lower quality
-                while size_map[quality] == 0 and quality > 0:
-                    logger.warning(
-                        "The requested quality %s is not available. Falling back to quality %s",
-                        quality,
-                        quality - 1,
-                    )
-                    quality -= 1
-            else:
-                # No fallback - raise error
-                raise NonStreamableError(
-                    f"The requested quality {quality} is not available and fallback is disabled."
-                )
-        
-        # Update the quality in dl_info to reflect the final quality used
-        dl_info["quality"] = quality
-
-        _, format_str = quality_map[quality]
-
-        token = track_info["TRACK_TOKEN"]
-        try:
-            logger.debug("Fetching deezer url with token %s", token)
-            url = self.client.get_track_url(token, format_str)
-        except deezer.WrongLicense:
-            raise NonStreamableError(
-                "The requested quality is not available with your subscription. "
-                "Deezer HiFi is required for quality 2. Otherwise, the maximum "
-                "quality allowed is 1.",
-            )
-        except deezer.WrongGeolocation:
-            if not is_retry and fallback_id:
-                return await self.get_downloadable(fallback_id, quality, is_retry=True)
-            raise NonStreamableError(
-                "The requested track is not available. This may be due to your country/location.",
-            )
-
-        if url is None:
-            url = self._get_encrypted_file_url(
-                item_id,
-                track_info["MD5_ORIGIN"],
-                track_info["MEDIA_VERSION"],
-            )
-
-        dl_info["url"] = url
-        logger.debug("dz track info: %s", track_info)
-        return DeezerDownloadable(self.session, dl_info)
-
-    def _get_encrypted_file_url(
-        self,
-        meta_id: str,
-        track_hash: str,
-        media_version: str,
-    ):
-        logger.debug("Unable to fetch URL. Trying encryption method.")
-        format_number = 1
-
-        url_bytes = b"\xa4".join(
-            (
-                track_hash.encode(),
-                str(format_number).encode(),
-                str(meta_id).encode(),
-                str(media_version).encode(),
-            ),
-        )
-        url_hash = hashlib.md5(url_bytes).hexdigest()
-        info_bytes = bytearray(url_hash.encode())
-        info_bytes.extend(b"\xa4")
-        info_bytes.extend(url_bytes)
-        info_bytes.extend(b"\xa4")
-        # Pad the bytes so that len(info_bytes) % 16 == 0
-        padding_len = 16 - (len(info_bytes) % 16)
-        info_bytes.extend(b"." * padding_len)
-
-        path = binascii.hexlify(
-            AES.new(b"jo6aey6haid2Teih", AES.MODE_ECB).encrypt(info_bytes),
-        ).decode("utf-8")
-        url = f"https://e-cdns-proxy-{track_hash[0]}.dzcdn.net/mobile/1/{path}"
-        logger.debug("Encrypted file path %s", url)
-        return url
diff --git a/streamrip/rip/main.py b/streamrip/rip/main.py
index 562773f..069f66e 100644
--- a/streamrip/rip/main.py
+++ b/streamrip/rip/main.py
@@ -6,7 +6,7 @@ import platform
 import aiofiles
 
 from .. import db
-from ..client import Client, DeezerClient, QobuzClient, SoundcloudClient, TidalClient
+from ..client import Client, QobuzClient, SoundcloudClient, TidalClient
 from ..config import Config
 from ..console import console
 from ..media import (
@@ -51,7 +51,6 @@ class Main:
         self.clients: dict[str, Client] = {
             "qobuz": QobuzClient(config),
             "tidal": TidalClient(config),
-            "deezer": DeezerClient(config),
             "soundcloud": SoundcloudClient(config),
         }
 
diff --git a/streamrip/rip/prompter.py b/streamrip/rip/prompter.py
index 0cc30b8..0250852 100644
--- a/streamrip/rip/prompter.py
+++ b/streamrip/rip/prompter.py
@@ -7,7 +7,7 @@ from abc import ABC, abstractmethod
 from click import launch
 from rich.prompt import Prompt
 
-from ..client import Client, DeezerClient, QobuzClient, SoundcloudClient, TidalClient
+from ..client import Client, QobuzClient, SoundcloudClient, TidalClient
 from ..config import Config
 from ..console import console
 from ..exceptions import AuthenticationError, MissingCredentialsError
@@ -148,47 +148,6 @@ class TidalPrompter(CredentialPrompter):
         self.config.file.set_modified()
 
 
-class DeezerPrompter(CredentialPrompter):
-    client: DeezerClient
-
-    def has_creds(self):
-        c = self.config.session.deezer
-        return c.arl != ""
-
-    async def prompt_and_login(self):
-        if not self.has_creds():
-            self._prompt_creds_and_set_session_config()
-        while True:
-            try:
-                await self.client.login()
-                break
-            except AuthenticationError:
-                console.print("[yellow]Invalid arl, try again.")
-                self._prompt_creds_and_set_session_config()
-        self.save()
-
-    def _prompt_creds_and_set_session_config(self):
-        console.print(
-            "If you're not sure how to find the ARL cookie, see the instructions at ",
-            "[blue underline]https://github.com/nathom/streamrip/wiki/Finding-your-Deezer-ARL-Cookie",
-        )
-        c = self.config.session.deezer
-        c.arl = Prompt.ask("Enter your [bold]ARL")
-
-    def save(self):
-        c = self.config.session.deezer
-        cf = self.config.file.deezer
-        cf.arl = c.arl
-        self.config.file.set_modified()
-        console.print(
-            f"[green]Credentials saved to config file at [bold cyan]{self.config.path}",
-        )
-
-    def type_check_client(self, client) -> DeezerClient:
-        assert isinstance(client, DeezerClient)
-        return client
-
-
 class SoundcloudPrompter(CredentialPrompter):
     def has_creds(self) -> bool:
         return True
@@ -206,7 +165,6 @@ class SoundcloudPrompter(CredentialPrompter):
 
 PROMPTERS = {
     "qobuz": QobuzPrompter,
-    "deezer": DeezerPrompter,
     "tidal": TidalPrompter,
     "soundcloud": SoundcloudPrompter,
 }
diff --git a/tests/test_deezer.py b/tests/test_deezer.py
deleted file mode 100644
index 5b7b7d7..0000000
--- a/tests/test_deezer.py
+++ /dev/null
@@ -1,145 +0,0 @@
-import os
-import pytest
-from unittest.mock import Mock, patch
-from util import arun
-
-from streamrip.client.downloadable import DeezerDownloadable
-from streamrip.client.deezer import DeezerClient
-from streamrip.config import Config
-from streamrip.exceptions import NonStreamableError
-
-@pytest.fixture(scope="session")
-def deezer_client():
-    """Integration test fixture - requires DEEZER_ARL environment variable"""
-    config = Config.defaults()
-    config.session.deezer.arl = os.environ.get("DEEZER_ARL", "")
-    config.session.deezer.quality = 2  # FLAC
-    config.session.deezer.lower_quality_if_not_available = True
-    client = DeezerClient(config)
-    arun(client.login())
-    
-    yield client
-    
-    arun(client.session.close())
-
-@pytest.fixture
-def mock_deezer_client():
-    """Unit test fixture - mocked client for fast testing"""
-    config = Config.defaults()
-    config.session.deezer.arl = "test_arl"
-    config.session.deezer.quality = 2
-    config.session.deezer.lower_quality_if_not_available = True
-    
-    client = DeezerClient(config)
-    client.client = Mock()
-    client.client.gw = Mock()
-    client.session = Mock()
-    
-    return client
-
-# ===== UNIT TESTS =====
-
-def test_deezer_fallback_logic_with_mock_data(mock_deezer_client):
-    """Unit test: fallback logic works with mocked track data"""
-    # Mock track info where FLAC is unavailable but MP3_320 is available
-    # quality_map: [(9, "MP3_128"), (3, "MP3_320"), (1, "FLAC")]
-    # So FILESIZE_MP3_128 = quality 0, FILESIZE_MP3_320 = quality 1, FILESIZE_FLAC = quality 2
-    mock_track_info = {
-        "FILESIZE_FLAC": 0,      # FLAC unavailable (quality 2)
-        "FILESIZE_MP3_320": 5000000, # MP3_320 available (quality 1)
-        "FILESIZE_MP3_128": 2000000, # MP3_128 available (quality 0)
-        "TRACK_TOKEN": "test_token"
-    }
-    
-    # Mock the client methods
-    mock_deezer_client.client.gw.get_track.return_value = mock_track_info
-    mock_deezer_client.client.get_track_url.return_value = "https://test.mp3"
-    
-    # Test fallback behavior
-    with patch.object(mock_deezer_client, 'get_session'):
-        downloadable = arun(mock_deezer_client.get_downloadable("123", quality=2))
-        
-        # Should have fallen back to quality 1 (MP3_320) since FLAC is unavailable
-        assert downloadable.quality == 1
-
-def test_deezer_no_fallback_when_quality_available(mock_deezer_client):
-    """Unit test: no fallback when requested quality is available"""
-    # Mock track info where FLAC is available
-    # quality_map: [(9, "MP3_128"), (3, "MP3_320"), (1, "FLAC")]
-    mock_track_info = {
-        "FILESIZE_FLAC": 25000000, # FLAC available (quality 2)
-        "FILESIZE_MP3_320": 5000000,  # MP3_320 available (quality 1)
-        "FILESIZE_MP3_128": 2000000,  # MP3_128 available (quality 0)
-        "TRACK_TOKEN": "test_token"
-    }
-    
-    mock_deezer_client.client.gw.get_track.return_value = mock_track_info
-    mock_deezer_client.client.get_track_url.return_value = "https://test.flac"
-    
-    with patch.object(mock_deezer_client, 'get_session'):
-        downloadable = arun(mock_deezer_client.get_downloadable("123", quality=2))
-        
-        # Should use requested quality 2 (FLAC)
-        assert downloadable.quality == 2
-
-def test_deezer_fallback_to_lowest_available_quality(mock_deezer_client):
-    """Unit test: fallback walks down quality list until finding available quality"""
-    # Mock track info where only MP3_128 is available
-    # quality_map: [(9, "MP3_128"), (3, "MP3_320"), (1, "FLAC")]
-    mock_track_info = {
-        "FILESIZE_FLAC": 0,      # FLAC unavailable (quality 2)
-        "FILESIZE_MP3_320": 0,      # MP3_320 unavailable (quality 1)
-        "FILESIZE_MP3_128": 2000000, # MP3_128 available (quality 0)
-        "TRACK_TOKEN": "test_token"
-    }
-    
-    mock_deezer_client.client.gw.get_track.return_value = mock_track_info
-    mock_deezer_client.client.get_track_url.return_value = "https://test.mp3"
-    
-    with patch.object(mock_deezer_client, 'get_session'):
-        downloadable = arun(mock_deezer_client.get_downloadable("123", quality=2))
-        
-        # Should have fallen back to quality 0 (MP3_128) since higher qualities unavailable
-        assert downloadable.quality == 0
-
-def test_deezer_no_fallback_when_disabled(mock_deezer_client):
-    """Unit test: no fallback when lower_quality_if_not_available is False"""
-    # Disable fallback
-    mock_deezer_client.config.lower_quality_if_not_available = False
-    
-    # Mock track info where FLAC is unavailable
-    # quality_map: [(9, "MP3_128"), (3, "MP3_320"), (1, "FLAC")]
-    mock_track_info = {
-        "FILESIZE_FLAC": 0,      # FLAC unavailable (quality 2)
-        "FILESIZE_MP3_320": 5000000, # MP3_320 available (quality 1)
-        "FILESIZE_MP3_128": 2000000, # MP3_128 available (quality 0)
-        "TRACK_TOKEN": "test_url"
-    }
-    
-    mock_deezer_client.client.gw.get_track.return_value = mock_track_info
-    mock_deezer_client.client.get_track_url.return_value = "https://test.mp3"
-    
-    # Should raise an error when requested quality is unavailable and fallback is disabled
-    with patch.object(mock_deezer_client, 'get_session'):
-        with pytest.raises(NonStreamableError, match="The requested quality 2 is not available and fallback is disabled"):
-            arun(mock_deezer_client.get_downloadable("123", quality=2))
-
-# ===== INTEGRATION TEST =====
-
-@pytest.mark.skipif(
-    "DEEZER_ARL" not in os.environ, reason="Deezer ARL not found in env."
-)
-def test_deezer_fallback_actually_occurred(deezer_client):
-    """Integration test: verify fallback works with real track 77874822"""
-    # We know track 77874822 doesn't have FLAC available, so test fallback scenario
-    downloadable = arun(deezer_client.get_downloadable("77874822", quality=2))
-    
-    # Since we requested FLAC (quality=2) but it's not available,
-    # we should have fallen back to the next available quality (1 = MP3_320)
-    assert downloadable.quality == 1, "Should have fallen back to MP3_320 when FLAC unavailable"
-    print("Fallback occurred: FLAC unavailable, fell back to MP3_320")
-    
-    # Verify the URL is actually accessible and working
-    assert downloadable.url.startswith("https://")
-    assert downloadable._size > 0, "Downloadable should have a valid file size"
-    assert downloadable.extension == "mp3", "MP3_320 should have .mp3 extension"
diff --git a/tests/test_error_handling.py b/tests/test_error_handling.py
index 67f6a6e..db0b8f8 100644
--- a/tests/test_error_handling.py
+++ b/tests/test_error_handling.py
@@ -84,7 +84,6 @@ class TestErrorHandling:
         with (
             patch("streamrip.rip.main.QobuzClient"),
             patch("streamrip.rip.main.TidalClient"),
-            patch("streamrip.rip.main.DeezerClient"),
             patch("streamrip.rip.main.SoundcloudClient"),
         ):
             main = Main(mock_config)