一个基于索尼官方API的第三方电影海报和宣传素材下载网站。
启动项目:
# 1. 安装Python3 (如果需要) sudo apt update && sudo apt install -y python3 python3-pip python3-venv # 2. 进入项目目录 cd /workspace # 3. 使用UV创建虚拟环境 uv venv --python 3.11 # 4. 激活虚拟环境 source .venv/bin/activate # 5. 安装依赖 uv pip install -r requirements.txt uv pip install -e . # 6. 运行应用 python run.py
索尼crunchyroll海报 浏览器f12查看network的链接复制出来, 主要有两个参数, groupTypeCode=E和territoryId=3, groupTypeCode的E代表Exhibitor,还可以为P。 territoryId=3是德国的地区id。所有的地区id可以在注册页面通过浏览器f12看到 获取德国、账号身份权限类型为groupTypeCode=E时的所有电影,得到多个电影id : https://globalassethub.sonypictures.com/gahapi/homePage/fetchHomePageReleaseInfo?territoryId=3&groupTypeCode=E 打开以上链接会得到电影id,比如其中一个电影的id为releaseId":66193 获取德国releaseId电影id为66193的这个电影的所有文件 https://globalassethub.sonypictures.com/gahapi/assets/fetchByRelease?&groupTypeCode=E&releaseId=66193&territoryId=3&userId=1 获取新西兰所有电影,得到多个电影电影id,比如releaseId":66014 https://globalassethub.sonypictures.com/gahapi/homePage/fetchHomePageReleaseInfo?territoryId=1&groupTypeCode=E 电影id为releaseId":66014的所有文件 https://globalassethub.sonypictures.com/gahapi/assets/fetchByRelease?&groupTypeCode=E&releaseId=66014&territoryId=1&userId=1 也就是说获取文件时候,国家ID territoryId=1 和groupTypeCode也需要
ZIP压缩包文件排在最后
邮箱: rubsan.chen@outlook.com 密码: 12Qwjkl.yh8q
# 1. 运行项目初始化脚本
chmod +x setup_project.sh
./setup_project.sh
# 2. 启动应用
./start.sh
# Ubuntu/Debian
sudo apt update
sudo apt install -y python3 python3-pip python3-venv
# 安装 uv (Python 包管理器)
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.bashrc
# 创建虚拟环境
python3 -m venv venv
# 激活虚拟环境
source venv/bin/activate
# 使用 uv 安装依赖 (推荐)
uv pip install -e .
# 或者使用传统方式
uv pip install -r requirements.txt
# 生产模式
./start.sh
# 开发模式 (带调试)
./start_dev.sh
# 或者直接运行
source venv/bin/activate
python app.py
打开浏览器访问: http://localhost:8082
# 运行API测试
./run_tests.sh
# 或者单独测试
source venv/bin/activate
python simple_test.py
/workspace/ ├── app.py # 主应用文件 ├── run.py # 生产环境启动脚本 ├── pyproject.toml # UV项目配置 ├── requirements.txt # 传统依赖文件 ├── setup_project.sh # 项目初始化脚本 ├── start.sh # 生产模式启动脚本 ├── start_dev.sh # 开发模式启动脚本 ├── check_env.sh # 环境检查脚本 ├── run_tests.sh # 测试运行脚本 ├── test_api.py # 完整API测试脚本 ├── simple_test.py # 简单连接测试 ├── .gitignore # Git忽略文件 ├── venv/ # Python虚拟环境 ├── templates/ │ ├── index.html # 主页模板 │ └── movie_detail.html # 电影详情页模板 └── README.md # 项目说明文档
/ - 根据地区和权限类型获取电影列表/movie/<title_id>/<release_id> - 显示电影的所有可下载文件/api/download/<runner_id> - 获取文件下载链接ZIP文件 (优先级2)
# 测试API连接
python simple_test.py
# 测试完整功能
python test_api.py
groupTypeCode=E时候, territoryId有以下:
| Territory Name | Territory ID |
|---|---|
| Australia | 15 |
| Austria | 11 |
| Brazil | 13 |
| Germany | 3 |
| New Zealand | 1 |
| Spain | 12 |
| Switzerland (Fr) | 1041 |
| Switzerland (Ger) | 16 |
| Switzerland (Itl) | 17 |
| United Kingdom & Ireland | 10 |
| United States | 7 |
groupTypeCode=P时候, territoryId可以取以下值:
| Territory Name | Territory ID |
|---|---|
| Argentina | 1000 |
| Australia | 15 |
| Austria | 11 |
| Bahrain | 1043 |
| Belgium | 1034 |
| Brazil | 13 |
| Bulgaria | 1001 |
| Chile | 1002 |
| China | 1035 |
| Colombia | 1003 |
| Croatia | 1038 |
| Czech Republic | 1004 |
| Denmark | 1005 |
| Ecuador | 1006 |
| Egypt | 1044 |
| Estonia | 1048 |
| Finland | 1007 |
| France | 9 |
| Germany | 3 |
| Greece | 1008 |
| Hong Kong | 1009 |
| Hungary | 1010 |
| India | 1036 |
| Indonesia | 1011 |
| Israel | 1012 |
| Italy | 1013 |
| Japan | 14 |
| Kazakhstan | 1049 |
| Kuwait | 1045 |
| Latvia | 1014 |
| Lithuania | 1015 |
| Malaysia | 1016 |
| Mexico | 2 |
| Netherlands | 1017 |
| New Zealand | 1 |
| Nigeria | 1018 |
| Norway | 1019 |
| Peru | 1020 |
| Philippines | 1021 |
| Poland | 1022 |
| Portugal | 1023 |
| Qatar | 1046 |
| Romania | 1024 |
| Saudi Arabia | 1047 |
| Serbia | 1039 |
| Singapore | 1037 |
| Slovakia | 1025 |
| Slovenia | 1040 |
| South Africa | 1026 |
| South Korea | 4 |
| Spain | 12 |
| Sweden | 1027 |
| Switzerland (Fr) | 1041 |
| Switzerland (Ger) | 16 |
| Switzerland (Itl) | 17 |
| Taiwan | 6 |
| Thailand | 1028 |
| Turkey | 1029 |
| Ukraine | 1030 |
| United Arab Emirates | 1042 |
| United Kingdom & Ireland | 10 |
| United States | 7 |
| Uruguay | 1031 |
| Venezuela | 1032 |
| Vietnam | 1033 |
提示词和原网站api: