我正在寻找类似 cURL 的东西来从 Discogs API 获取封面图片。
我有这个输出:
{"pagination": {"page": 1, "pages": 1, "per_page": 50, "items": 5, "urls": {}}, "results": [{"country": "Germany", "year": "1986", "format": ["Vinyl", "12\"", "45 RPM"], "label": ["WEA", "WEA Musik GmbH", "WEA Filipacchi Music"], "type": "release", "genre": ["Electronic", "Pop"], "style": ["Disco", "Synth-pop"], "id": 598957, "barcode": ["LC 4281", "GEMA BIEM", "France: WE 221"], "master_id": 73508, "master_url": "https://api.discogs.com/masters/73508", "uri": "/Rose-Laurens-American-Love-Extended-Version/release/598957", "catno": "248 812-0", "title": "Rose Laurens - American Love (Extended Version)", "thumb": "https://img.discogs.com/juSxuRz0lhvMOQu9jsZAK_7uKKc=/fit-in/150x150/filters:strip_icc():format(jpeg):mode_rgb():quality(40)/discogs-images/R-598957-1572721294-8254.jpeg.jpg", "cover_image": "https://img.discogs.com/JcL8GoCbo19zvyqUS57KRgB-81Q=/fit-in/600x594/filters:strip_icc():format(jpeg):mode_rgb():quality(90)/discogs-images/R-598957-1572721294-8254.jpeg.jpg", "resource_url": "https://api.discogs.com/releases/598957", "community": {"want": 70, "have": 273}, "format_quantity": 1, "formats": [{"name": "Vinyl", "qty": "1", "descriptions": ["12\"", "45 RPM"]}]}, {"country": "Italy", "year": "1987", "format": ["Vinyl", "12\"", "45 RPM", "Stereo"], "label": ["Limited Edition Records", "Flarenasch", "Limited Edition Records", "Flarenasch"], "type": "release", "genre": ["Electronic", "Pop"], "style": ["Europop", "Synth-pop"], "id": 774544, "barcode": ["LE 011 A", "LE 011 B", "S.I.A.E."], "master_id": 73508, "master_url": "https://api.discogs.com/masters/73508", "uri": "/Rose-Laurens-American-Love-Remix/release/774544", "catno": "LE 011", "title": "Rose Laurens - American Love (Remix)", "thumb": "https://img.discogs.com/xuiciV7XSJhYLyrPPGlsPKRk9l8=/fit-in/150x150/filters:strip_icc():format(jpeg):mode_rgb():quality(40)/discogs-images/R-774544-1324833177.jpeg.jpg", "cover_image": "https://img.discogs.com/FqsCJjI7k_5NQlqlyqr4jSe_2xs=/fit-in/600x602/filters:strip_icc():format(jpeg):mode_rgb():quality(90)/discogs-images/R-774544-1324833177.jpeg.jpg", "resource_url": "https://api.discogs.com/releases/774544", "community": {"want": 32, "have": 59}, "format_quantity": 1, "formats": [{"name": "Vinyl", "qty": "1", "descriptions": ["12\"", "45 RPM", "Stereo"]}]}, {"country": "France", "year": "2019", "format": ["CD", "Compilation", "Limited Edition", "Mispress", "Remastered"], "label": ["CD Rare", "Flarenasch", "Wagram Music", "Wagram Music", "Arnaud Ralite", "Wagram Music", "Arnaud Ralite"], "type": "release", "genre": ["Electronic", "Pop"], "style": ["Chanson", "Synth-pop"], "id": 13640144, "barcode": ["3 300610 913675", "91367-1 Rose Laurens - The Collection Volume 2 CD1", "91367-2 Rose Laurens - The Collection Volume 2 CD2", "91367-3 Rose Laurens - The Collection Volume 2 CD3", "SACEM/SDRM"], "master_id": 1550622, "master_url": "https://api.discogs.com/masters/1550622", "uri": "/Rose-Laurens-Collection-Volume-2/release/13640144", "catno": "91367", "title": "Rose Laurens - Collection Volume 2", "thumb": "https://img.discogs.com/klSxa3id_sf6FYiIT8Qg1VaPVfc=/fit-in/150x150/filters:strip_icc():format(jpeg):mode_rgb():quality(40)/discogs-images/R-13640144-1558082772-3926.jpeg.jpg", "cover_image": "https://img.discogs.com/WxmEZdN53iyv5dYDO1pjQ5i05A4=/fit-in/600x510/filters:strip_icc():format(jpeg):mode_rgb():quality(90)/discogs-images/R-13640144-1558082772-3926.jpeg.jpg", "resource_url": "https://api.discogs.com/releases/13640144", "community": {"want": 14, "have": 6}, "format_quantity": 3, "formats": [{"name": "CD", "qty": "3", "descriptions": ["Compilation", "Limited Edition", "Mispress", "Remastered"]}]}, {"country": "France", "year": "1988", "format": ["Vinyl", "12\"", "45 RPM", "Maxi-Single"], "label": ["Wall Street Music", "Wall Street Music", "Carrere"], "type": "release", "genre": ["Electronic"], "style": ["Downtempo", "Synth-pop"], "id": 1232281, "barcode": ["3 298640 088992", "3298640088992", "SACEM SACD SDRM SGDL", "CA 618"], "master_id": 0, "master_url": null, "uri": "/Valerie-Cannon-Hold-Me-Forever/release/1232281", "catno": "8 889", "title": "Valerie Cannon* - Hold Me Forever", "thumb": "https://img.discogs.com/8kFEPBZySlmL0qCQaEmXeqguZhs=/fit-in/150x150/filters:strip_icc():format(jpeg):mode_rgb():quality(40)/discogs-images/R-1232281-1278797697.jpeg.jpg", "cover_image": "https://img.discogs.com/pvi47AKIm2DEK79VuepELR3-X6Y=/fit-in/600x600/filters:strip_icc():format(jpeg):mode_rgb():quality(90)/discogs-images/R-1232281-1278797697.jpeg.jpg", "resource_url": "https://api.discogs.com/releases/1232281", "community": {"want": 9, "have": 36}, "format_quantity": 1, "formats": [{"name": "Vinyl", "qty": "1", "descriptions": ["12\"", "45 RPM", "Maxi-Single"]}]}, {"country": "Germany", "year": "2011", "format": ["CD", "Compilation", "Remastered"], "label": ["Sony Music", "Neue Oldies Braucht Das Land"], "type": "release", "genre": ["Electronic", "Rock", "Pop"], "style": ["Pop Rock", "Synth-pop", "Vocal", "Symphonic Rock"], "id": 2674622, "barcode": ["8 86978 30492 6", "LC 10879", "B.I.E.M. / GEMA"], "master_id": 0, "master_url": null, "uri": "/Various-Neue-Oldies-Braucht-Das-Land-Vol2-Hits-Rarit%C3%A4ten-Der-80er/release/2674622", "catno": "88697 83049 2", "title": "Various - Neue Oldies Braucht Das Land Vol.2 - Hits & Rarit\u00e4ten Der 80er", "thumb": "https://img.discogs.com/TpbpB5QGrfNr0jE2w89S93VfD_U=/fit-in/150x150/filters:strip_icc():format(jpeg):mode_rgb():quality(40)/discogs-images/R-2674622-1322578324.jpeg.jpg", "cover_image": "https://img.discogs.com/-ax4nZ4tmeBjQeTNEw-OSBpPDrQ=/fit-in/400x400/filters:strip_icc():format(jpeg):mode_rgb():quality(90)/discogs-images/R-2674622-1322578324.jpeg.jpg", "resource_url": "https://api.discogs.com/releases/2674622", "community": {"want": 13, "have": 47}, "format_quantity": 2, "formats": [{"name": "CD", "qty": "2", "descriptions": ["Compilation", "Remastered"]}]}]}
并且只需要这一行来显示:
https://img.discogs.com/JcL8GoCbo19zvyqUS57KRgB-81Q=/fit-in/600x594/filters:strip_icc():format(jpeg):mode_rgb():quality(90)/discogs-images/R-598957-1572721294-8254.jpeg.jpg
感谢帮助。