     
     private func setUp(urlString:String) throws ->[String]
     {
-        var URLArray = [String]()
-        
         if let url = URL(string:urlString)
         {
             debugPrint("开始获取url")
-            let scanner = Scanner(string: try String(contentsOf:url))
             
-            while !scanner.isAtEnd
-            {
-                URLArray.append(scanWith(head:"{from:'mv_rk'})\" href=\"",foot:"\">",scanner:scanner))
-            }
-            
+            let URLArray = scanWith(data:try String(contentsOf:url),head:"{from:'mv_rk'})\" href=\"",foot:"\">")
+
             if URLArray.count == 0
             {
                 throw crawlerError(msg:"数据初始化失败")
             }
             
             debugPrint("获取url结束")
+            
+            return URLArray
         }
         else
         {
             throw crawlerError(msg:"查询URL初始化失败")
         }
-        return URLArray.filter{$0.characters.count > 0}
     }
     
     private func handleData(data:[String]) throws

        for case let url in data.map({ URL(string:$0) })
        {
            guard let _ = url else { throw crawlerError(msg:"数据\(index)初始化失败") }

            Threading.getQueue(name: "sync", type: .serial).dispatch
            {
                do
                {
                    let scanner = Scanner(string: try String(contentsOf:url!))
                    var (head,foot) = ("data-name=",".jpg")
                    
                    //电影模型
                    var tempStr = (head + self.scanWith(head:head,foot:foot,scanner:scanner) + foot).components(separatedBy: "data-").map{
                        "\"\($0)".replacingOccurrences(of: "=", with: "\":").trim(string:" ")
                    }
                    


#if os(Linux)
    import SwiftGlibc
#endif

import Foundation
import PerfectThread
import MongoDB
import PerfectLogger

