Giter Club home page Giter Club logo

spider_smooc's Introduction

前段时间安装了一个慕课网app,发现不用注册就可以在线看其中的视频,就有了想爬取其中的视频,用来在电脑上学习。 决定花两天时间用学了一段时间的python做一做。

我的新书《Python爬虫开发与项目实战》出版了,喜欢的话可以看一下样章

我使用的是pycharm进行开发,使用BeautifulSoup模块解析html,整个代码进行了比较详细的注释。 整个工程结构:

----entity

--------init.py

--------fileinfor.py用来描述视频文件信息

----filedeal

--------init.py

--------file_downloader.py用于视频文件的下载

----spider 爬虫的核心内容

--------init.py

--------html_downloader.py html下载器

--------html_parser.py html解析器

--------spiderman.py 爬虫核心逻辑

----test test文件夹主要是用来测试一些用例,不参与整个程序运行

----conf.py 一些全局变量

----index.py 程序启动入口

运行环境: python 2.7.X
需要安装的支持模块:
BeautifulSoup (pip install或者下载源代码包setup.py)
下载链接:https://pypi.python.org/pypi/beautifulsoup4/4.3.2

运行:在windows上直接双击start.bat,linux上没试
我的微信公众号:qiye_python

博客:http://blog.csdn.net/qiye_/http://www.cnblogs.com/qiyeboy/
使用效果图:



-----------------------2016年10月31号更新------------------------
修改为新的解析方式,突破慕课网的封锁,添加使用说明截图

spider_smooc's People

Contributors

qiyeboy avatar

Watchers

 avatar

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.