forked from SearchPilot/cmcrawler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
39 lines (23 loc) · 1.53 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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