def getStartUrl(self): #从文件初始化查询关键词 qlist = GetQuery().get_data() for query in qlist: if query: #默认时间排序 query_url = "/ns?rn=20&word=" + urllib.quote(query.encode('utf8')) + '&ct=0' self.start_urls.append(self.domain_url + query_url)
def getStartUrl(self): #从文件初始化查询关键词 #sort_by_time = '&sort=1' sort_by_time = '' qlist = GetQuery().get_data() for query in qlist: if query: query_url = '?query=' + urllib.quote(query.encode('utf8')) + sort_by_time self.start_urls.append(self.domain_url + query_url)
def getStartUrl(self): #从文件初始化查询关键词 #sort_by_time = '&qft=sortbydate%3d"1"' sort_by_time = '' qlist = GetQuery().get_data() for query in qlist: if query: query_url = '/news/search?q=' + urllib.quote(query.encode('utf8')) + sort_by_time self.start_urls.append(self.domain_url + query_url)
def getStartUrl(self): #从文件初始化查询关键词 qlist = GetQuery().get_data() for query in qlist: if query: #默认时间排序 query_url = "?offset=0&format=json&count=50&keyword=" + urllib.quote( query.encode('utf8')) self.start_urls.append(self.domain_url + query_url)
def getStartUrl(self): #从文件初始化查询关键词 tag = '&s=11800334043319024933&srt=lds&sti=1440&nsid=0' qlist = GetQuery().get_data() for query in qlist: if query: #默认时间排序 query_url = "/search?q=" + urllib.quote( query.encode('utf8')) + tag self.start_urls.append(self.domain_url + query_url)
def getStartUrl(self): #从文件初始化查询关键词 #过去24小时 timeTag = '&tsn=1' qlist = GetQuery().get_data() for query in qlist: if query: query_url = '?type=2&query=' + urllib.quote( query.encode('utf8')) + timeTag self.start_urls.append(self.domain_url + query_url)
def getStartUrl(self): #从文件初始化查询关键词 #发帖时间 pageTag = '&s=4' #回复时间 #pageTag = '&s=6' #默认相关性排序 qlist = GetQuery().get_data() for query in qlist: if query: query_url = '/bbs?q=' + urllib.quote( query.encode('utf8')) + pageTag self.start_urls.append(self.domain_url + query_url)