sample function
#coding:utf8 import requests import json import ssl import datetime import urllib import sys import json import time import random reload(sys) sys.setdefaultencoding( "utf-8" ) ssl._create_default_https_context = ssl._create_unverified_context requests.packages.urllib3.disable_warnings() def getall(html): #reg=r'<td>(.*?)</td>' html=html.replace('\n','').replace('\n\r','') reg=r'<tr class="">(.*?)</tr>' listre=re.compile(reg) mylist=re.findall(listre,html.strip()) return mylist