A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
| require 'rubygems' | |
| require 'mechanize' | |
| def comment_douban_topic(url,text) | |
| login_url = "http://www.douban.com/login" | |
| agent = Mechanize.new | |
| # agent.set_proxy("218.201.21.176","80") | |
| agent.user_agent_alias = "Googlebot" | |
| page = agent.get(login_url) | |
| These character sets are not exhaustive, but merely a quick reference for common characters. | |
| Quotation | |
| ‘ ‘ \2018 Open single quotation mark | |
| ’ ’ \2019 Closed single quotation mark / Apostrophe | |
| “ “ \201C Open double quotation mark | |
| ” ” \201D Closed double quotation mark | |
| ' ' \0027 Typewriter single quotation mark | |
| " " \0022 Typewriter double quotation mark | |
| ′ ′ \2032 Prime (Feet / Minutes) |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| import logging | |
| import requests | |
| ''' | |
| A module for helping you to finish the daily task on Neteasy Music | |
| ''' |