Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# encoding: utf-8
# author: 04
def doc_xpath(doc, xpath):
"""
>>> a = {'a': [{'b': {'c': ['d', 'f']}}, {'b': {'c': ['g', 'h']}}]}
>>> doc_xpath(a, 'a.b')
Traceback (most recent call last):
@tvboxme
tvboxme / vote.py
Created December 16, 2015 02:43 — forked from cj1324/vote.py
lagou Vote for python2.x
#!/usr/bin/env python2
# encoding: utf-8
from __future__ import (unicode_literals,
print_function)
import time