GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - JPlin/image_crawler: 爬虫,模块松耦合

BranchesTags
Open more actions menu

Latest commit

 

History

9 Commits
9 Commits

Folders and files

NameName
Last commit message
Last commit date
__pycache__
__pycache__
 
 
module
module
 
 
static
static
 
 
templates
templates
 
 
.gitignore
.gitignore
 
 
Crawler.py
Crawler.py
 
 
DB.py
DB.py
 
 
QueryKeywords.py
QueryKeywords.py
 
 
Utils.py
Utils.py
 
 
cmd
cmd
 
 
keyword.txt
keyword.txt
 
 
params.cfg
params.cfg
 
 
readme.md
readme.md
 
 
records.txt
records.txt
 
 
requirements.txt
requirements.txt
 
 
url.db
url.db
 
 
web_app.py
web_app.py
 
 

Repository files navigation

使用环境:

  • python 3.6
  • pip install -r requirements.txt

使用方式

  1. 配置params.cfg文件 配置图片存放路径:database(默认当前目录的images文件夹)
    可以配置的图片网站有 google , flicker , getty , bing
    可以配置的项是:图片的大小 , 图片的上传日期(flicker 支持) ,页面的数量,每页几张图片,图片的格式等等(具体查看params.cfg)

  2. 配置keyword.txt文件 在文件中列出搜索图片要用的关键字 ,'#'代表注释掉

  3. 当前目录下 在 python环境的cmd输入

python Querykeywords.py params.cfg keyword.txt

开始爬取路径并下载图片
4. 当前目录下 在 python环境的cmd输入

python app.py

启动简易服务器
 5. 根据提示打开网页(localhost:5000)进行图片下载数目查看

目录结构

  • ./images : 存放图片的地方,可以在params.cfg 中进行修改
    • ./images/每个 keyword 对应一个文件夹
    • ./module : 搜索引擎模块
    • ./tempolate : 网页模板
    • ./keyword.txt : 搜索关键字
    • ./params.cfg : 爬虫配置项
    • ./url.db : SQlite3 数据库文件(已经新建了四个表)

运行网页截图

'web preview'

About

爬虫,模块松耦合

Topics

baidumapbingcrawlerflaskflickergooglesqlite3

Resources

Readme
Activity

Stars

4 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.