コード例 #1
0
ファイル: Mtree.py プロジェクト: WXW322/ProrocolReverseTool
 def print_exptree(self):
     queue = Queue()
     # print(self.start,self.end)
     queue.put(self)
     while (not queue.empty()):
         t_f = queue.get()
         print(t_f.start, t_f.end)
         for f in t_f.fields:
             t_f.put(f)
コード例 #2
0
ファイル: spider_ph.py プロジェクト: t3stt3st/testtest
	def newProcExecuteCmd(self, queue, cmd):
		if cmd == "" or cmd == None:
			return False
		result = (commands.getstatusoutput(cmd))
		print result
		# print result
		if result[0] != 0:
			queue.put(-1)
			return
		queue.put(result[1])
		return
コード例 #3
0
ファイル: spider.py プロジェクト: chenli90s/spider-depth
    def newProcExecuteCmd(self, queue, cmd):
        import os

        if cmd == "" or cmd is None:
            return False
        print cmd
        #result = (commands.getstatusoutput(cmd))
        result = [0, os.popen(cmd).read()]
        # print result

        #print result[1]
        if result[0] != 0:
            queue.put(-1)
            return
        queue.put(result[1])

        return
コード例 #4
0
def download_album(links,folder):
    for link in links:
        filename='%s\\%s'%(folder,link.split('/')[-1])
        queue.put((link,filename))
コード例 #5
0
def download_album(links, folder):
    for link in links:
        filename = "%s\\%s" % (folder, link.split("/")[-1])
        queue.put((link, filename))
コード例 #6
0
def download_album(photos, folder):
    for pic in photos:
        url = re.findall('large:\'(.*?)\'', pic)[0]
        filename = "".join((folder, '\\', url.split('/')[-1]))
        queue.put((url, filename))
コード例 #7
0
def download_album(links, folder):
    for link in links:
        filename = '%s\\%s' % (folder, link.split('/')[-1])
        queue.put((link, filename))
コード例 #8
0
def download_album(photos,folder):
    for pic in photos:
        url=re.findall('large:\'(.*?)\'',pic)[0]
        filename="".join((folder,'\\',url.split('/')[-1]))
        queue.put((url,filename))