Skip to content

用scrapy框架爬虫爬取小说导入数据库并用django框架搭建自己的小说网站

Notifications You must be signed in to change notification settings

qq290070744/Fiction

Repository files navigation

用scrapy框架爬虫爬取小说导入数据库并用django框架搭建自己的小说网站

爬虫项目目录

Fiction/app01/fiction_scrapy

安装依赖模块:

pip3 install -r requirements.txt

爬虫启动命令:

cd Fiction/app01/fiction_scrapy/fiction_scrapy/spiders && scrapy crawl [spider] --nolog

【scrapy list】列出当前项目中所有可用的spider,每行输出一个spider:

$ scrapy list
ymlt
yqxs123
yubook
yueduyue
yushuwu
yyxs555
zfbook
zhuishubang
zhuishushenqi
zhxs
...

截图示例

Alt text Alt text

小说网站启动命令(启动前先修改数据库配置文件settings.py同步数据库 ):

python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py runserver 0:8000

下面是截图

Alt text Alt text Alt text Alt text

About

用scrapy框架爬虫爬取小说导入数据库并用django框架搭建自己的小说网站

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published