Aaron Chen 
  • Home
  • Archives
  • Categories
  • Tags
  • About
  •   
  •   

Scrapy-2

Scrapy 2Example 1:We are going to visit the “placekitten“. Here we want to use Python to visit the network and download the picture from it. Example 2:Translate the sentence with the help of “http://

2016-09-08
Web Spider
Python Scrapy

Scrapy 1

Scrapy 1Web SpiderPython: How to connect to the Internet? urllib: (url + lib)URL :protocol:// hostname[:port] / path / [;parameters][?query]#fragmentprotocol -> http, https, ftp, file, ed2k…hostnam

2016-09-08
Web Spider
Python Scrapy

Python-Generator

Generatoryield():in ordinary function Coroutine(协同程序):可以运行的独立函数的调用,函数可以暂停或者挂起,并在需要的时候可以从离开的地方继续或重新开始。(与函数生成的局部变量到了函数外失效不同)

2016-09-04
Python

Magic Methods 7

Magic Methods: IterationBIF : iter()、next()

2016-09-04
Magic Methods
Python Magic Methods

Magic Methods 6

Magic Methods : customize the containerProtocols : it is similar with the port in other program language. In Python, it functions as a guide. Container : Alignment[list, tuple, string] and mapping[di

2016-09-04
Magic Methods
Python Magic Methods

Magic Methods 5

Magic Methods : Descriptor - Property描述符 : 将某种特殊类型的类的实例指派给另一个类的属性。 特殊类型为以下方法的1-3个 : __get__(self, instance, owner):用于访问属性,它返回属性的值 __set__(self, instance, value):将在属性分配操作中调用,不返回任何内容 __delete__(self,

2016-09-03
Magic Methods
Python Magic Methods

Magic Methods 4

Magic Methods: Attribute AccessWe can use the “.” operator to access the attribute. Also, we can use the magic methods to access it.

2016-09-02
Magic Methods
Python Magic Methods

Magic Methods 3

CustomizationRequirements: Customize a class of timer Function with ‘start’ and ‘stop’ methods t1 and print(t1) -> Result When the timer is stopped or yet not started, call the relevant method for

2016-08-31
Magic Methods
Python Magic Methods

Magic Methods 2

Magic Methods 2: Mathematical Calculation P1int, float, string, tuple, list… -> Factory Function

2016-08-30
Magic Methods
Python Magic Methods

Magic Methods-1

Magic Methods 1: Construction & Destruction中文释义 : 构造和析构。 In this part, we will introduce three magic methods about construction and destruction. They are init, new and del.

2016-08-29
Magic Methods
Python Magic Methods
1234567

Search

Hexo Fluid