![見出し画像](https://assets.st-note.com/production/uploads/images/131458085/rectangle_large_type_2_1eff28c90a547a29fec4af065f11f141.png?width=1200)
2-4★Google Colabでスクレイピング
Google Colabで好きなキーワードで画像を10点収集
feedparser(RSSフィードの収集)
1.ライブラリのインポート
今回はサンプルコードが用意されているのでそちらを活用する。
紹介されたライブラリ
icrawler(画像収集)
from icrawler.builtin import BingImageCrawler
2.Pythonコードをコピペ
こちらのnoteを参照してGoogle Colabにコピペする。
一部、アレンジを加える。
search keywordsの中を「猫 アメリカンショートヘア フリー」に変更
![](https://assets.st-note.com/img/1708387762930-QKj1672b4h.png?width=1200)
![](https://assets.st-note.com/img/1708388072134-HURq6I1Zbc.png?width=1200)
3.アメリカンショートヘアの画像10点を収集
![](https://assets.st-note.com/img/1708389385574-82kHBdNYxQ.png?width=1200)
![](https://assets.st-note.com/img/1708389714400-5vbJZqjwdZ.png?width=1200)