Skip to content

Instantly share code, notes, and snippets.

@k0001
k0001 / crawler.py
Created August 15, 2011 00:52 — forked from jmoiron/crawler.py
Simple gevent/httplib2 web crawler.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Simple async crawler/callback queue based on gevent."""
import traceback
import logging
import httplib2
import gevent
@k0001
k0001 / microformats.py
Created May 4, 2011 11:48 — forked from scoffey/microformats.py
Python microformats parser that supports hCard, hCalendar, hResume and rel-tag and provides an extensible model for other microformats.
# -*- coding: utf-8 -*-
#!/usr/bin/env python
"""
Model for microformat properties and parsers. A microformat parser can
parse an HTML element into a dictionary of properties, whose keys are
strings and whose values are strings or other dictionary of properties.
As an example, the main program of this script parses an hResume from
given URL.
#!/usr/bin/env python
# coding: utf-8
# Copyright (c) 2010, Renzo Carbonara <gnuk0001@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,