Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

手机备份的照片全在默认的 album下,如何下载到本地? #161

Open
xinmans opened this issue Jan 26, 2024 · 9 comments
Open

Comments

@xinmans
Copy link

xinmans commented Jan 26, 2024

看了example,没找到合适的操作方法,用默认album的相册id list文件会报错

@xinmans
Copy link
Author

xinmans commented Feb 1, 2024

 """
    6333175 None 3 default  # 注意,云盘中会有一个 默认的 album,无法删除
    6333175 None None starred
    iqbf34LjW2 标题。 3 manual
    k6R1nmadvf6 产品标题。 0 manual
    """
    
    用6333175去list_ablum_file会报错

@lemisky
Copy link
Member

lemisky commented Mar 13, 2024

from aligo import Aligo

if __name__ == '__main__':
    ali = Aligo()
    albums = ali.list_albums()
    for album in albums:
        if album.type != 'manual':
            continue
        photos = ali.list_album_files(album.album_id)
        for photo in photos:
            print(photo.name, photo.drive_id, photo.file_id, photo.download_url)

@lemisky
Copy link
Member

lemisky commented Mar 13, 2024

@xinmans

@lemisky
Copy link
Member

lemisky commented Mar 13, 2024

对于相册所有图片,可通过 search 方法获取

from aligo import Aligo

if __name__ == '__main__':
    ali = Aligo()
    photos = ali.search_files(drive_id=ali.album_info.driveId)
    for photo in photos:
        if photo.type == 'file':
            print(photo.name, photo.download_url)

@lemisky
Copy link
Member

lemisky commented Mar 13, 2024

更新到最新版 v6.2.1

from aligo import Aligo

if __name__ == '__main__':
    ali = Aligo()
    albums = ali.list_albums()
    for album in albums:
        photos = ali.list_album_files(album.album_id)
        for photo in photos:
            print(photo.name, photo.drive_id, photo.file_id, photo.download_url)

@qinggeng2015
Copy link

qinggeng2015 commented Nov 9, 2024

photo.download_url是空的了,ali.list_albums()也是空的了,似乎已经无法下载了,
image
image

@lemisky
Copy link
Member

lemisky commented Nov 9, 2024

阿里做了限制,即使有下载链接也会限速,另外毕竟这是“黑接口”,所以一直没有处理这个问题

@qinggeng2015
Copy link

阿里做了限制,即使有下载链接也会限速,另外毕竟这是“黑接口”,所以一直没有处理这个问题

那就是说现在已经没办法批量下载相册中的照片了

@lemisky
Copy link
Member

lemisky commented Nov 9, 2024

是的,下载还是走官方吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants