download:Python Crawler on mobile – Version 2020

Crawler can be divided into several general directions: WEB page data capture, App data capture, software system data capture. This course mainly explains how to use Python to realize App data capture. From the development environment construction, detailed explanation of the essential tools of App crawler, project combat, to the final integration of multi-app data capture project, to achieve real-time data display, let you master App data capture skills, to better Python crawler engineer!

Suits the crowd

For those of you who want to learn about data scraping,

As a Python crawler engineer,

This course is definitely for you!

Technical reserve requirements

Fundamentals of Python syntax (function wrapping, package calling,

TCP three-way handshake process, Requests module,

Python multithreading, Python multithreading)

Import time def show_info(): print(" ") def write_loginfo(username): print(" ") def write_loginfo(username): Param username: username """ with open('log.txt','a') as f: String = "User name: {} Login time: {}\n".format(username ,time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))) f.write(string) def Read_loginfo (): """ """ """ with open('log.txt','r') as f: while True: line = f.readline() if line == ": Print (line) # print a line if __name__ == "__main__": While len(username) < 2: Print (' username = 1 ') print(' username = 1 ') print(' username = 1 ') print(' username = 1 ') print(' username = 1 ') print(' username = 2 ') Print (' Password should be at least 6 characters long ') password = input(' Please enter password: Num = int(input(' ') print(' ') print(' ') write_loginfo(username) If num == 0: print(' num ') break elif num == 1: Print (' print ') read_loginfo() show_info() num = int(input(' print ') else: Print (' you input a wrong number ') show_info () num = int (input (' input operation number:)) -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 3. Imitate taobao customer service automatic replyCopy the code

3 def find_answer(question): 4 with open('reply.txt','r') as f: 5 while True: 6 line=f.readline() 7 if not line: # can also for the if the line = = 9 '8 break keyword = line. The split (' |') [0] 10. Reply = line split (' | ') [1] 11 if keyword in question: 15 if __name__ =='__main__': if __name__ =='__main__': 16 question=input(' please input what you want to ask: ') 19 break 20 reply=find_answer(question) 21 if not reply: 22 question=input(" I don't know what you are talking about, you can ask something about order, account and payment (to exit please enter bye) : ") 24 print(reply) 25 question=input(" You can ask something about order, account and payment (please enter bye to exit) : ") 27 ')Copy the code