Skip to content

Instantly share code, notes, and snippets.

@shinseitaro
Created March 21, 2022 00:13
Show Gist options
  • Save shinseitaro/c7b3e61fe952f52b166e999d9af15570 to your computer and use it in GitHub Desktop.
Save shinseitaro/c7b3e61fe952f52b166e999d9af15570 to your computer and use it in GitHub Desktop.
picture scraper.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "picture scraper.ipynb",
"provenance": [],
"authorship_tag": "ABX9TyNoiA7kjl6mu8Irtk4iQ8k6",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/shinseitaro/c7b3e61fe952f52b166e999d9af15570/picture-scraper.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "9kmTTKObyMQr"
},
"outputs": [],
"source": [
"!pip install icrawler"
]
},
{
"cell_type": "code",
"source": [
"from icrawler.builtin import BingImageCrawler\n",
"crawler = BingImageCrawler(storage={\"root_dir\": \"マレーバクの赤ちゃん\"})\n",
"crawler.crawl(keyword=\"マレーバクの赤ちゃん\", max_num=10)"
],
"metadata": {
"id": "XhTbyBO4yNIR"
},
"execution_count": null,
"outputs": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment