@@ -0,0 +1,788 @@
+#!/bin/env python%0A# -*- coding: utf-8 -*- %0A%0Aimport urllib2%0Afrom pyquery import PyQuery as pq%0Afrom lxml import etree%0Aimport re%0A%0A%0Adef get_html(url):%0A    html = urllib2.urlopen(url).read()%0A    return html %0A%0Adef get_content(html):%0A    match = re.search(r'%3Cdiv class=%22content%22%3E(%5B%5E$%5D*)%3Cdiv class=%22article-copyright%22%3E',html)%0A    content = match.group(1)%0A    return content%0A%0Adef get_result(content):%0A    content = content.decode('utf-8')%0A    jq = pq(content)%0A    l = jq('p')%0A    result = %5B%5D%0A    for string in l:%0A        result.append(pq(string).text()) %0A    return result%0A%0A%0Adef main():%0A    url = 'http://jimmy66.com/164.html'%0A    html = get_html(url)%0A    content = get_content(html)%0A    result = get_result(content)%0A    for line in result:%0A        print line%0Aif __name__ == '__main__':%0A    main()

complete 0008