bdim404 / music-download-telegram-bot

Downloads music telegram bot by python (support Apple Music & Spotify now)
BSD 3-Clause "New" or "Revised" License
11 stars 3 forks source link

wvd and cookies are in directory still #2

Closed rahulbanwasi closed 7 months ago

rahulbanwasi commented 7 months ago

Traceback (most recent call last): File "/home/ubuntu/abo/src/main.py", line 5, in from apple_music_checker import AppleMusicChecker File "/home/ubuntu/abo/src/apple_music_checker.py", line 20, in downloader = Downloader() File "/home/ubuntu/abo/src/apple_music_downloader.py", line 53, in init self.wvd_location = Path(WVD_LOCATION) File "/usr/lib/python3.10/pathlib.py", line 960, in new self = cls._from_parts(args) File "/usr/lib/python3.10/pathlib.py", line 594, in _from_parts drv, root, parts = self._parse_args(args) File "/usr/lib/python3.10/pathlib.py", line 578, in _parse_args a = os.fspath(a) TypeError: expected str, bytes or os.PathLike object, not NoneType

bdim404 commented 7 months ago

Have you check your .wvd file location info in .env?

rahulbanwasi commented 7 months ago

Have you check your .wvd file location info in .env?

Hi i just realised what was the error, the env example stated i had to use "DEVICE_LOCATION" variable and the error stated WVD_LOCATION Variable. Changed the variable and it worked however there is no metadata in songs fetched from apple music. no covert or even artists name or anything. Just file name is there. photo_2024-04-08_18-48-13

rahulbanwasi commented 7 months ago

also single tracks download is also not working hehe

Final URL: https://music.apple.com/in/album/love-you-so-bad/1297985202?i=1297985227 apple_music_checker.py:32 The link is a song. apple_music_checker.py:42 HTTP Request: POST apple_music_checker.py:74 No song item found for ID: 1297985202 apple_music_checker.py:107 HTTP Request: POST https://api.telegram.org/"HTTP/1.1 200 OK" _client.py:1773 Downloading song 1297985202... apple_music_checker.py:332 Failed to get song 1297985202: 'songList' apple_music_checker.py:377 Downloaded the song. apple_music_checker.py:380 No error handlers are registered, logging exception. _application.py:1831 Traceback (most recent call last): File "/home/ubuntu/.local/lib/python3.10/site-packages/telegram/ext/_application.py", line 1264, in process_update await coroutine File "/home/ubuntu/.local/lib/python3.10/site-packages/telegram/ext/_handlers/basehandler.py", line 157, in handle_update return await self.callback(update, context) File "/home/ubuntu/abo/src/main.py", line 64, in handleRequest await downloader.check_link_type(update, context, url) File "/home/ubuntu/abo/src/apple_music_checker.py", line 43, in check_link_type await self.check_song_in_sql(update, url, context) File "/home/ubuntu/abo/src/apple_music_checker.py", line 115, in check_song_in_sql await self.download_song(update, reply_message, not_found_song, not_found_fount, context, media_group) File "/home/ubuntu/abo/src/apple_music_checker.py", line 383, in download_song downloader.cleanup_temp_path() File "/home/ubuntu/abo/src/apple_music_downloader.py", line 292, in cleanup_temp_path shutil.rmtree(self.temp_path) File "/usr/lib/python3.10/shutil.py", line 715, in rmtree onerror(os.lstat, path, sys.exc_info()) File "/usr/lib/python3.10/shutil.py", line 713, in rmtree orig_st = os.lstat(path) FileNotFoundError: [Errno 2] No such file or directory: 'temp'

bdim404 commented 7 months ago

Delete your telegram bot token in your comment first, and i will check this problem.

rahulbanwasi commented 7 months ago

Delete your telegram bot token in your comment first, and i will check this problem.

thanks! sorry for dumping all the bugs like this but there is another error for large entity

"HTTP/1.1 413 Request Entity Too Large" _client.py:1773 Error: Request Entity Too Large (413)

bdim404 commented 7 months ago

Your all problems have been fixed in https://github.com/bdim404/music-download-telegram-bot/commit/5dac1a8b14e106a66673a1e2df0ef52bb2525843. We support download the songs in only one link at a time now. You can download new version and try again, thanks for your issue!