Giter VIP home page Giter VIP logo

deeplearningimagecaptcha's Introduction

Python3 网络爬虫开发实战

本书介绍了如何利用 Python 3 开发网络爬虫。书中首先详细介绍了环境配置过程和爬虫基础知识;然后讨论了 urllib、requests 等请求库,Beautiful Soup、XPath、pyquery 等解析库以及文本和各类数据库的存储方法;接着通过多个案例介绍了如何进行 Ajax 数据爬取,如何使用 Selenium 和 Splash 进行动态网站爬取;接着介绍了爬虫的一些技巧,比如使用代理爬取和维护动态代理池的方法,ADSL 拨号代理的使用,图形、 极验、点触、宫格等各类验证码的破解方法,模拟登录网站爬取的方法及 Cookies 池的维护。 此外,本书还结合移动互联网的特点探讨了使用 Charles、mitmdump、Appium 等工具实现 App 爬取 的方法,紧接着介绍了 pyspider 框架和 Scrapy 框架的使用,以及分布式爬虫的知识,最后介绍了 Bloom Filter 效率优化、Docker 和 Scrapyd 爬虫部署、Gerapy 爬虫管理等方面的知识。

本书由图灵教育 - 人民邮电出版社出版发行,版权所有,禁止转载。

作者:崔庆才

购买地址:

加读者群:

视频资源:

Python3 爬虫三大案例实战分享

自己动手,丰衣足食!Python3 网络爬虫实战案例

deeplearningimagecaptcha's People

Contributors

dee1024 avatar germey avatar kenvifire avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

deeplearningimagecaptcha's Issues

识别其它图片出错

Traceback (most recent call last):
File "D:\DeepLearningImageCaptcha\DeepLearningImageCaptcha-master\predict.py", line 39, in
main()
File "D:\DeepLearningImageCaptcha\DeepLearningImageCaptcha-master\predict.py", line 20, in main
for i, (images, labels) in enumerate(predict_dataloader):
File "D:\fsy\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 628, in next
data = self._next_data()
File "D:\fsy\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 671, in _next_data
data = self.dataset_fetcher.fetch(index) # may raise StopIteration
File "D:\fsy\Anaconda3\lib\site-packages\torch\utils\data_utils\fetch.py", line 58, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\fsy\Anaconda3\lib\site-packages\torch\utils\data_utils\fetch.py", line 58, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\DeepLearningImageCaptcha\DeepLearningImageCaptcha-master\dataset.py", line 25, in getitem
label = ohe.encode(image_name.split('
')[0])
File "D:\DeepLearningImageCaptcha\DeepLearningImageCaptcha-master\encoding.py", line 24, in encode
vector[idx] = 1.0
IndexError: index 163 is out of bounds for axis 0 with size 144

在用predict.py去预测其它图片时出错,简单看了一下源码文件名是符合格式的xxxx_yyyy.zzz
怎么把predict.py文件改写一下呢,或者要把图片转换成什么格式?本人对深度学习这些不熟悉,望指点一下

FileNotFoundError: [Errno 2] No such file or directory: 'model.pkl'

在执行步骤三:

    python train.py

出现下面的错误

epoch: 0 step: 0 loss: 0.7400339245796204
Traceback (most recent call last):
  File "L:\Projects\chapter8\DeepLearningImageCaptcha\train.py", line 49, in <module>
    main()
  File "L:\Projects\chapter8\DeepLearningImageCaptcha\train.py", line 39, in main
    eval_acc = evaluate()
  File "L:\Projects\chapter8\DeepLearningImageCaptcha\evaluate.py", line 14, in main
    cnn.load_state_dict(torch.load('model.pkl'))
  File "L:\Projects\calculate\lib\site-packages\torch\serialization.py", line 699, in load
    with _open_file_like(f, 'rb') as opened_file:
  File "L:\Projects\calculate\lib\site-packages\torch\serialization.py", line 231, in _open_file_like
    return _open_file(name_or_buffer, mode)
  File "L:\Projects\calculate\lib\site-packages\torch\serialization.py", line 212, in __init__
    super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'model.pkl'

在项目根目录下,手动创建文件model.pkl之后,再次运行步骤三的命令,出现下面的错误

epoch: 0 step: 0 loss: 0.7259010672569275
Traceback (most recent call last):
  File "L:\Projects\chapter8\DeepLearningImageCaptcha\train.py", line 49, in <module>
    main()
  File "L:\Projects\chapter8\DeepLearningImageCaptcha\train.py", line 39, in main
    eval_acc = evaluate()
  File "L:\Projects\chapter8\DeepLearningImageCaptcha\evaluate.py", line 14, in main
    cnn.load_state_dict(torch.load('model.pkl'))
  File "L:\Projects\calculate\lib\site-packages\torch\serialization.py", line 713, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "L:\Projects\calculate\lib\site-packages\torch\serialization.py", line 920, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
EOFError: Ran out of input

求大佬帮忙。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.