Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaarey committed Jun 27, 2024
1 parent cd126d6 commit 3052984
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
9. 新增get-m3u8-from-device 改为true 且设置端口`adb forward tcp:20020 tcp:20020`即从模拟器获取m3u8
10. 文件夹和文件支持模板
11. 支持下载歌手 `go run main.go https://music.apple.com/us/artist/taylor-swift/159260351`
12. 新增[wrapper](https://github.com/zhaarey/wrapper/releases)模式 目前只能linux运行,解密速度超快,基本秒解

本项目仅支持ALAC和Atmos
- `alac (audio-alac-stereo)`
Expand Down

7 comments on commit 3052984

@zhordon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to expand on m3u8 text file? The Reqable script doesn't seem to save a file, and making a raw text file with links to album doesn't result in any downloads for batch downloading. Thanks for your efforts!

@zhaarey
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to expand on m3u8 text file? The Reqable script doesn't seem to save a file, and making a raw text file with links to album doesn't result in any downloads for batch downloading. Thanks for your efforts!

from reqable import *
import plistlib,requests,io

def onRequest(context, request):
    return request

def onResponse(context, response):
    plist_bytes = response.body.payload.encode('utf-8')
    plist_file = io.BytesIO(plist_bytes)
    plist_data = plistlib.load(plist_file)
    songList=plist_data["songList"][0]
    m3u8_url=songList["mp-hls-playlist-url"]
    metadata=songList["assets"][0]["metadata"]
    disk=metadata["discNumber"]
    num=metadata["trackNumber"]
    title=metadata["sort-name"]
    songid=metadata["itemId"]
    albumid=metadata["playlistId"]
    albumname=metadata["sort-album"]
    with open('C:\apple.txt', 'a', encoding='utf-8') as file:
        file.write(f"Disk {disk} Track {num} - {title}\n")
        file.write(f"{songid},{m3u8_url}\n")
  
    api_url = 'http://drm.zhaarey.cn:19919/m3u8'
    params = {
    "method": "add_m3u8",
    "params": {
        "songid": songid,
        "song_title": f"Disk {disk} Track {num} - {title}",
        "albumid": albumid,
        "album_title": albumname,
        "m3u8": m3u8_url,
    }
    }
    print(params)
    resp = requests.post(api_url, json=params,verify=False)
    resp = json.loads(resp.text)
    status_code = resp['status_code']
    print(str(status_code))
    response.code=404
    return response

@zhordon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I keep getting different errors (shown below) with the code above for Reqable app when trying to get text file. This is the only thing that I can't figure out because using a text file with direct link to album doesn't work. Any other tips to get this doing?

Traceback (most recent call last): File "main.py", line 45, in <module> main() File "main.py", line 14, in main onResponse(argv[1]) File "main.py", line 35, in onResponse result = addons.onResponse(context, CaptureHttpResponse(data['response'])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "addons.py", line 11, in onResponse songList=plist_data["songList"][0] ~~~~~~~~~~^^^^^^^^^^^^ KeyError: 'songList'

image

@zhaarey
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I keep getting different errors (shown below) with the code above for Reqable app when trying to get text file. This is the only thing that I can't figure out because using a text file with direct link to album doesn't work. Any other tips to get this doing?

Traceback (most recent call last): File "main.py", line 45, in <module> main() File "main.py", line 14, in main onResponse(argv[1]) File "main.py", line 35, in onResponse result = addons.onResponse(context, CaptureHttpResponse(data['response'])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "addons.py", line 11, in onResponse songList=plist_data["songList"][0] ~~~~~~~~~~^^^^^^^^^^^^ KeyError: 'songList'

image

use it get from device

https://new.space/s/aIg0T4KMWTUiVbvKqb00ww#KmRmVVds4gRh6nbzgAF9zi4n9vIqVLKbvzz8PGoTO-0

@zhordon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I keep getting different errors (shown below) with the code above for Reqable app when trying to get text file. This is the only thing that I can't figure out because using a text file with direct link to album doesn't work. Any other tips to get this doing?
Traceback (most recent call last): File "main.py", line 45, in <module> main() File "main.py", line 14, in main onResponse(argv[1]) File "main.py", line 35, in onResponse result = addons.onResponse(context, CaptureHttpResponse(data['response'])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "addons.py", line 11, in onResponse songList=plist_data["songList"][0] ~~~~~~~~~~^^^^^^^^^^^^ KeyError: 'songList'
image

use it get from device

https://new.space/s/aIg0T4KMWTUiVbvKqb00ww#KmRmVVds4gRh6nbzgAF9zi4n9vIqVLKbvzz8PGoTO-0

I had to change port number from 20020 to 10020 to get it to function.

It's shows connected to device and then stays stuck on that screen and doesn't do anything when running the wrapper.

Any other advise?

image

@zhaarey
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

当我尝试获取文本文件时,使用上述 Reqable 应用代码时,我不断收到不同的错误(如下所示)。这是我唯一无法弄清楚的事情,因为使用带有相册直接链接的文本文件不起作用。还有其他提示可以解决此问题吗?
Traceback (most recent call last): File "main.py", line 45, in <module> main() File "main.py", line 14, in main onResponse(argv[1]) File "main.py", line 35, in onResponse result = addons.onResponse(context, CaptureHttpResponse(data['response'])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "addons.py", line 11, in onResponse songList=plist_data["songList"][0] ~~~~~~~~~~^^^^^^^^^^^^ KeyError: 'songList'
图像

使用它从设备获取
https://new.space/s/aIg0T4KMWTUiVbvKqb00ww#KmRmVVds4gRh6nbzgAF9zi4n9vIqVLKbvzz8PGoTO-0

我必须将端口号从 20020 更改为 10020 才能使其正常运行。

它显示已连接到设备,然后停留在该屏幕上,并且在运行包装器时不执行任何操作。

还有其他建议吗?

图像

wrapper is not support get-m3u8-from-device, set it false

@zhaarey
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

当我尝试获取文本文件时,使用上述 Reqable 应用代码时,我不断收到不同的错误(如下所示)。这是我唯一无法弄清楚的事情,因为使用带有相册直接链接的文本文件不起作用。还有其他提示可以解决此问题吗?
Traceback (most recent call last): File "main.py", line 45, in <module> main() File "main.py", line 14, in main onResponse(argv[1]) File "main.py", line 35, in onResponse result = addons.onResponse(context, CaptureHttpResponse(data['response'])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "addons.py", line 11, in onResponse songList=plist_data["songList"][0] ~~~~~~~~~~^^^^^^^^^^^^ KeyError: 'songList'
图像

使用它从设备获取
https://new.space/s/aIg0T4KMWTUiVbvKqb00ww#KmRmVVds4gRh6nbzgAF9zi4n9vIqVLKbvzz8PGoTO-0

我必须将端口号从 20020 更改为 10020 才能使其正常运行。

它显示已连接到设备,然后停留在该屏幕上,并且在运行包装器时不执行任何操作。

还有其他建议吗?

图像

wrapper‘s get-m3u8-from-device support is trying to develop

Please sign in to comment.