Python Collection of problems seen by crawler :

1. NotImplementedError: Only the following pseudo-classes are implemented:

Answer:nth-child Change to nth-of-type

3.expected string or bytes-like object:

Answer: Code conversion .


4. 'gbk' codec can't encode character '\xa5' in position 184823: illegal
multibyte sequence

Answer:f = open(html,’w’,encoding = ‘utf-8’)

5.  Web page garbled problem : Chinese random code

Answer :response = requests.get(url,headers = header).content

#content Solve the garbled code

6. expected string or bytes-like object

Answer: Convert to string format ,str(urls)

urls =' div > div.nei_left.fl > ul > li:nth-of-type(2)> a')[0]

Href = re.findall(r'<a href="(.*?)" target="" title=".*?">(.*?)</a>',str(urls))

7.  Raise URLError (err)  <urlopen error [Errno 11001] getaddrinfo failed>

usually ,URLError There is no network connection at ( There is no routing to a specific server ), Or when the server does not exist

©2020 ioDraw All rights reserved
【webpack】DLL plugin Principle analysis Combined with source code Transformer The most comprehensive , The deepest analysis filemanager-webpack-plugin Turn resources into zip Package and archive JavaScript study ( Function declaration and parameters ) mean value - Implementation and application of variance model _python_ Data analysis _9JAVA Snake games ( Source code + notes )SpringBoot integrate Redisson Implement delay queue python code , Easy to complete Snake games Thread.setDaemon Set up the Daemons Unity Code dynamic creation of preform in editor expansion function