Giter Site home page Giter Site logo

cmcrawler's Introduction

cmcrawler.py

By Ian Lurie
Using the following amazing libraries, without which I'd be hopelessly out of luck:
httplib
BeautifulSoup
urlparse


12.13.10 revision:
BIG changes to the crawler:

1. Reduced crawl time by switching to httplib instead of urllib.
2. Now tests for 404 and other status codes.
3. Now grabs header to determine content type.
4. Command-line switch to stick with internal or check external URLs.

cmcrawler.py is meant to be a light, fast, Python-driven crawler.

To use the crawler, go to your command line (ACK, I KNOW!) and type 

python cmcrawler.py http://www.siteurl.com [crawl external]

Replace [crawl external] with a 0 if you just want to crawl internal URLs, or 1 if you want to crawl external, too.

It'll then cheerfully go off and start crawling your site, outputting the result as it goes. It doesn't save the output anywhere! You can cut-and-paste the result if you're really insane, or do the easier:

python cmcrawler.py http://www.siteurl.com [crawl external] >> filename.txt

That'll write the results to a text file, instead.

If none of this makes sense to you, you probably shouldn't be messing with this. I'm not saying that to be mean. This is a crawler written by someone who knows juuuuust enough to be dangerous. As such, you should be very, very careful with it.

I would greatly appreciate any improvements/tweaks that folks make. Please check them back into GIT or send 'em to me. This is a community thing, I hope.



KNOWN ISSUES/TWEAKS NEEDED
See the GIThub page at https://github.com/wrttnwrd/cmcrawler/issues

cmcrawler's People

Contributors

devinberg 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.