Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove sample

  • Loading branch information...
commit 9604e0dc5f92ee5aec88f4418a42250f12ca6e28 1 parent e2aadfc
@gigix authored
Showing with 0 additions and 23 deletions.
  1. +0 −23 mechanise_sample.py
View
23 mechanise_sample.py
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.