Dockerhub容器信息獲取

由於畢業設計需要分析容器信息,一開始採取爬蟲獲取dockerhub網站發現那些想要的信息是異步加載的,遂抓包拿到具體的內容,相關信息如下:

Dockerhub API:
1. Use image_filter to find official image,page_size can be used to control the results from this api.
Api example: https://hub.docker.com/api/content/v1/products/search?image_filter=official&page_size=160&q=&type=image

2. Use image name to get full data
https://hub.docker.com/v2/repositories/library/couchbase/

通過上面兩種Api,可以先從第1個裏面獲取,然後取1中的slug名字,訪問2中的內容,完成具體數據獲取。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章