Permalink
Browse files

remove sample

  • Loading branch information...
gigix committed Mar 6, 2012
1 parent e2aadfc commit 9604e0dc5f92ee5aec88f4418a42250f12ca6e28
Showing with 0 additions and 23 deletions.
  1. +0 −23 mechanise_sample.py
View
@@ -1,23 +0,0 @@
-import mechanize
-from lxml import etree
-
-br = mechanize.Browser()
-response = br.open("http://book.douban.com/subject/2042269/collections")
-
-def get_url(element):
- return element.get("href")
-
-page_content = response.read()
-page_dom = etree.HTML(page_content)
-links = page_dom.xpath("//div[@id='collections_tab']//div[@class='sub_ins']//div[@class='pl2']//a")
-urls = map(get_url, links)
-print urls
-
-# for link in br.links(url_regex="http://book.douban.com/people/(.+)/"):
-# print link.url
-#
-# # print response.read()
-#
-# br.open("http://book.douban.com/people/keeplazy/collect")
-# for link in br.links(url_regex="http://book.douban.com/subject/(.+)/"):
-# print link.url

0 comments on commit 9604e0d

Please sign in to comment.