I was testing a couple URL's with the new updates you made and noticed that when SwiftLinkPreview parses www.youtube.com, the app freezes. Debugging reveals there seems to be some sort of infinite loop.
I've included a typical back trace for youtube issue (which I think is made more complicated because I'm using this swift code on an obj-c project, but anyways)
* thread #1: tid = 0x46efd, 0x0000000101907d04 libswiftCore.dylib`_swift_retain_(swift::HeapObject*) + 20, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x0000000101907d04 libswiftCore.dylib`_swift_retain_(swift::HeapObject*) + 20
frame #1: 0x0000000101843d28 libswiftCore.dylib`generic specialization <Swift.String.UnicodeScalarView._ScratchGenerator with Swift.String.UnicodeScalarView._ScratchGenerator : Swift.GeneratorType in Swift> of Swift.UTF16.decode <A where A: Swift.GeneratorType, A.Element == Swift.UInt16> (inout A) -> Swift.UnicodeDecodingResult + 136
frame #2: 0x0000000101877d7c libswiftCore.dylib`function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Dead> of static Swift.String.CharacterView.Index._measureExtendedGraphemeClusterForward (Swift.String.UnicodeScalarView.Index) -> Swift.Int + 140
frame #3: 0x00000001018af718 libswiftCore.dylib`generic specialization <Swift.String.CharacterView.Index with Swift.String.CharacterView.Index : Swift.ForwardIndexType in Swift, Swift.Int with Swift.Int : Swift._SignedIntegerType in Swift, Swift.Int with Swift.Int : Swift._BuiltinIntegerLiteralConvertible in Swift, Swift._DisabledRangeIndex_> of (extension in Swift):Swift.ForwardIndexType.distanceTo (A) -> A.Distance + 136
frame #4: 0x0000000101837d7c libswiftCore.dylib`protocol witness for Swift.ForwardIndexType.distanceTo (A) -> A.Distance in conformance Swift.String.CharacterView.Index : Swift.ForwardIndexType in Swift + 92
frame #5: 0x000000010174f088 libswiftCore.dylib`(extension in Swift):Swift.CollectionType.count.getter : A.Index.Distance + 244
frame #6: 0x0000000100201318 MyProject`static Regex.($0=0x0000000144d53960, index=2, text="<!DOCTYPE html><html lang=\"en\" data-cast-api-enabled=\"true\"><head><style name=\"www-roboto\">@font-face{font-family:\'Roboto\';font-style:italic;font-weight:500;src:local(\'Roboto Medium Italic\'),local(\'Roboto-MediumItalic\'),url(//fonts.gstatic.com/s/roboto/v15/OLffGBTaF0XFOW1gnuHF0Z0EAVxt0G0biEntp43Qt6E.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:italic;font-weight:400;src:local(\'Roboto Italic\'),local(\'Roboto-Italic\'),url(//fonts.gstatic.com/s/roboto/v15/W4wDsBUluyw0tK3tykhXEfesZW2xOQ-xsNqO47m55DA.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:normal;font-weight:400;src:local(\'Roboto Regular\'),local(\'Roboto-Regular\'),url(//fonts.gstatic.com/s/roboto/v15/zN7GBFwfMP4uA6AR0HCoLQ.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:normal;font-weight:500;src:local(\'Roboto Medium\'),local(\'Roboto-Medium\'),url(//fonts.gstatic.com/s/roboto/v15/RxZJdnzeo3R5zSexge8UUaCWcynf_cDxXwCLxiixG1c.ttf)format(\'truetype\');}</style><script name=\"www-roboto\">if (document.fonts &&"...) -> [String]).(closure #1) + 396 at Regex.swift:87
frame #7: 0x0000000100201470 MyProject`thunk + 44 at Regex.swift:0
frame #8: 0x0000000101749704 libswiftCore.dylib`(extension in Swift):Swift.CollectionType.map <A> ((A.Generator.Element) throws -> A1) throws -> Swift.Array<A1> + 716
frame #9: 0x00000001001ffefc MyProject`static Regex.stringMatches(results=Swift.Array<Foundation.NSTextCheckingResult> @ 0x000000016fd993a8, text="<!DOCTYPE html><html lang=\"en\" data-cast-api-enabled=\"true\"><head><style name=\"www-roboto\">@font-face{font-family:\'Roboto\';font-style:italic;font-weight:500;src:local(\'Roboto Medium Italic\'),local(\'Roboto-MediumItalic\'),url(//fonts.gstatic.com/s/roboto/v15/OLffGBTaF0XFOW1gnuHF0Z0EAVxt0G0biEntp43Qt6E.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:italic;font-weight:400;src:local(\'Roboto Italic\'),local(\'Roboto-Italic\'),url(//fonts.gstatic.com/s/roboto/v15/W4wDsBUluyw0tK3tykhXEfesZW2xOQ-xsNqO47m55DA.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:normal;font-weight:400;src:local(\'Roboto Regular\'),local(\'Roboto-Regular\'),url(//fonts.gstatic.com/s/roboto/v15/zN7GBFwfMP4uA6AR0HCoLQ.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:normal;font-weight:500;src:local(\'Roboto Medium\'),local(\'Roboto-Medium\'),url(//fonts.gstatic.com/s/roboto/v15/RxZJdnzeo3R5zSexge8UUaCWcynf_cDxXwCLxiixG1c.ttf)format(\'truetype\');}</style><script name=\"www-roboto\">if (document.fonts &&"..., index=2, self=MyProject.Regex) -> [String] + 564 at Regex.swift:93
frame #10: 0x0000000100200708 MyProject`static Regex.pregMatchAll(string="<!DOCTYPE html><html lang=\"en\" data-cast-api-enabled=\"true\"><head><style name=\"www-roboto\">@font-face{font-family:\'Roboto\';font-style:italic;font-weight:500;src:local(\'Roboto Medium Italic\'),local(\'Roboto-MediumItalic\'),url(//fonts.gstatic.com/s/roboto/v15/OLffGBTaF0XFOW1gnuHF0Z0EAVxt0G0biEntp43Qt6E.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:italic;font-weight:400;src:local(\'Roboto Italic\'),local(\'Roboto-Italic\'),url(//fonts.gstatic.com/s/roboto/v15/W4wDsBUluyw0tK3tykhXEfesZW2xOQ-xsNqO47m55DA.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:normal;font-weight:400;src:local(\'Roboto Regular\'),local(\'Roboto-Regular\'),url(//fonts.gstatic.com/s/roboto/v15/zN7GBFwfMP4uA6AR0HCoLQ.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:normal;font-weight:500;src:local(\'Roboto Medium\'),local(\'Roboto-Medium\'),url(//fonts.gstatic.com/s/roboto/v15/RxZJdnzeo3R5zSexge8UUaCWcynf_cDxXwCLxiixG1c.ttf)format(\'truetype\');}</style><script name=\"www-roboto\">if (document.fonts &&"..., regex="<span(.*?)>(.*?)</span>", index=2, self=MyProject.Regex) -> [String] + 1972 at Regex.swift:65
frame #11: 0x000000010021aae0 MyProject`SwiftLinkPreview.(tag="span", content="<!DOCTYPE html><html lang=\"en\" data-cast-api-enabled=\"true\"><head><style name=\"www-roboto\">@font-face{font-family:\'Roboto\';font-style:italic;font-weight:500;src:local(\'Roboto Medium Italic\'),local(\'Roboto-MediumItalic\'),url(//fonts.gstatic.com/s/roboto/v15/OLffGBTaF0XFOW1gnuHF0Z0EAVxt0G0biEntp43Qt6E.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:italic;font-weight:400;src:local(\'Roboto Italic\'),local(\'Roboto-Italic\'),url(//fonts.gstatic.com/s/roboto/v15/W4wDsBUluyw0tK3tykhXEfesZW2xOQ-xsNqO47m55DA.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:normal;font-weight:400;src:local(\'Roboto Regular\'),local(\'Roboto-Regular\'),url(//fonts.gstatic.com/s/roboto/v15/zN7GBFwfMP4uA6AR0HCoLQ.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:normal;font-weight:500;src:local(\'Roboto Medium\'),local(\'Roboto-Medium\'),url(//fonts.gstatic.com/s/roboto/v15/RxZJdnzeo3R5zSexge8UUaCWcynf_cDxXwCLxiixG1c.ttf)format(\'truetype\');}</style><script name=\"www-roboto\">if (document.fonts &&"..., self=0x0000000144b67f40)(String, content : String) -> String + 316 at SwiftLinkPreview.swift:480
frame #12: 0x000000010021a2e8 MyProject`SwiftLinkPreview.crawlCode(content="<!DOCTYPE html><html lang=\"en\" data-cast-api-enabled=\"true\"><head><style name=\"www-roboto\">@font-face{font-family:\'Roboto\';font-style:italic;font-weight:500;src:local(\'Roboto Medium Italic\'),local(\'Roboto-MediumItalic\'),url(//fonts.gstatic.com/s/roboto/v15/OLffGBTaF0XFOW1gnuHF0Z0EAVxt0G0biEntp43Qt6E.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:italic;font-weight:400;src:local(\'Roboto Italic\'),local(\'Roboto-Italic\'),url(//fonts.gstatic.com/s/roboto/v15/W4wDsBUluyw0tK3tykhXEfesZW2xOQ-xsNqO47m55DA.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:normal;font-weight:400;src:local(\'Roboto Regular\'),local(\'Roboto-Regular\'),url(//fonts.gstatic.com/s/roboto/v15/zN7GBFwfMP4uA6AR0HCoLQ.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:normal;font-weight:500;src:local(\'Roboto Medium\'),local(\'Roboto-Medium\'),url(//fonts.gstatic.com/s/roboto/v15/RxZJdnzeo3R5zSexge8UUaCWcynf_cDxXwCLxiixG1c.ttf)format(\'truetype\');}</style><script name=\"www-roboto\">if (document.fonts &&"..., self=0x0000000144b67f40) -> String + 140 at SwiftLinkPreview.swift:449
frame #13: 0x000000010021b074 MyProject`@objc SwiftLinkPreview.crawlCode(String) -> String + 72 at SwiftLinkPreview.swift:0
frame #14: 0x0000000100218994 MyProject`SwiftLinkPreview.crawlTitle(htmlCode="<!DOCTYPE html><html lang=\"en\" data-cast-api-enabled=\"true\"><head><style name=\"www-roboto\">@font-face{font-family:\'Roboto\';font-style:italic;font-weight:500;src:local(\'Roboto Medium Italic\'),local(\'Roboto-MediumItalic\'),url(//fonts.gstatic.com/s/roboto/v15/OLffGBTaF0XFOW1gnuHF0Z0EAVxt0G0biEntp43Qt6E.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:italic;font-weight:400;src:local(\'Roboto Italic\'),local(\'Roboto-Italic\'),url(//fonts.gstatic.com/s/roboto/v15/W4wDsBUluyw0tK3tykhXEfesZW2xOQ-xsNqO47m55DA.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:normal;font-weight:400;src:local(\'Roboto Regular\'),local(\'Roboto-Regular\'),url(//fonts.gstatic.com/s/roboto/v15/zN7GBFwfMP4uA6AR0HCoLQ.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:normal;font-weight:500;src:local(\'Roboto Medium\'),local(\'Roboto-Medium\'),url(//fonts.gstatic.com/s/roboto/v15/RxZJdnzeo3R5zSexge8UUaCWcynf_cDxXwCLxiixG1c.ttf)format(\'truetype\');}</style><script name=\"www-roboto\">if (document.fonts &&"..., self=0x0000000144b67f40) -> String + 912 at SwiftLinkPreview.swift:346
frame #15: 0x0000000100218ce0 MyProject`@objc SwiftLinkPreview.crawlTitle(String) -> String + 72 at SwiftLinkPreview.swift:0
frame #16: 0x000000010021533c MyProject`SwiftLinkPreview.(htmlCode="<!DOCTYPE html><html lang=\"en\" data-cast-api-enabled=\"true\"><head><style name=\"www-roboto\">@font-face{font-family:\'Roboto\';font-style:italic;font-weight:500;src:local(\'Roboto Medium Italic\'),local(\'Roboto-MediumItalic\'),url(//fonts.gstatic.com/s/roboto/v15/OLffGBTaF0XFOW1gnuHF0Z0EAVxt0G0biEntp43Qt6E.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:italic;font-weight:400;src:local(\'Roboto Italic\'),local(\'Roboto-Italic\'),url(//fonts.gstatic.com/s/roboto/v15/W4wDsBUluyw0tK3tykhXEfesZW2xOQ-xsNqO47m55DA.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:normal;font-weight:400;src:local(\'Roboto Regular\'),local(\'Roboto-Regular\'),url(//fonts.gstatic.com/s/roboto/v15/zN7GBFwfMP4uA6AR0HCoLQ.ttf)format(\'truetype\');}@font-face{font-family:\'Roboto\';font-style:normal;font-weight:500;src:local(\'Roboto Medium\'),local(\'Roboto-Medium\'),url(//fonts.gstatic.com/s/roboto/v15/RxZJdnzeo3R5zSexge8UUaCWcynf_cDxXwCLxiixG1c.ttf)format(\'truetype\');}</style><script name=\"www-roboto\">if (document.fonts &&"..., self=0x0000000144b67f40)(String) -> () + 196 at SwiftLinkPreview.swift:233
frame #17: 0x00000001002134f8 MyProject`SwiftLinkPreview.(completion=0x000000010021b1fc MyProject`partial apply forwarder for MyProject.SwiftLinkPreview.(preview (Swift.ImplicitlyUnwrappedOptional<Swift.String>, onSuccess : (Swift.Dictionary<Swift.String, Swift.AnyObject>) -> (), onError : (MyProject.PreviewError) -> ()) -> ()).(closure #1).(closure #1) at SwiftLinkPreview.swift, onError=0x00000001002139bc MyProject`partial apply forwarder for reabstraction thunk helper from @callee_unowned @convention(block) (@unowned MyProject.PreviewError) -> (@unowned ()) to @callee_owned (@owned MyProject.PreviewError) -> (@unowned ()) at SwiftLinkPreview.swift, self=0x0000000144b67f40)(() -> (), onError : (PreviewError) -> ()) -> () + 1656 at SwiftLinkPreview.swift:179
frame #18: 0x000000010021b950 MyProject`SwiftLinkPreview.(unshortened="www.youtube.com", self=0x0000000144b67f40, onSuccess=0x0000000100213938 MyProject`partial apply forwarder for reabstraction thunk helper from @callee_unowned @convention(block) (@unowned __ObjC.NSDictionary) -> (@unowned ()) to @callee_owned (@owned Swift.Dictionary<Swift.String, Swift.AnyObject>) -> (@unowned ()) at SwiftLinkPreview.swift, onError=0x00000001002139bc MyProject`partial apply forwarder for reabstraction thunk helper from @callee_unowned @convention(block) (@unowned MyProject.PreviewError) -> (@unowned ()) to @callee_owned (@owned MyProject.PreviewError) -> (@unowned ()) at SwiftLinkPreview.swift) -> (), onError : (PreviewError) -> ()) -> ()).(closure #1) + 500 at SwiftLinkPreview.swift:44
frame #19: 0x000000010021ca20 MyProject`SwiftLinkPreview.(completion=0x0000000100212d8c MyProject`partial apply forwarder for MyProject.SwiftLinkPreview.(preview (Swift.ImplicitlyUnwrappedOptional<Swift.String>, onSuccess : (Swift.Dictionary<Swift.String, Swift.AnyObject>) -> (), onError : (MyProject.PreviewError) -> ()) -> ()).(closure #1) at SwiftLinkPreview.swift, url="www.youtube.com")(NSURL, completion : (NSURL) -> ()) -> ()).(closure #1).(closure #2) + 76 at SwiftLinkPreview.swift:146
* thread #1: tid = 0x46efd, 0x0000000101907d04 libswiftCore.dylib`_swift_retain_(swift::HeapObject*) + 20, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x0000000101907d04 libswiftCore.dylib`_swift_retain_(swift::HeapObject*) + 20
frame #1: 0x0000000101843d28 libswiftCore.dylib`generic specialization <Swift.String.UnicodeScalarView._ScratchGenerator with Swift.String.UnicodeScalarView._ScratchGenerator : Swift.GeneratorType in Swift> of Swift.UTF16.decode <A where A: Swift.GeneratorType, A.Element == Swift.UInt16> (inout A) -> Swift.UnicodeDecodingResult + 136
frame #2: 0x0000000101877d7c libswiftCore.dylib`function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Dead> of static Swift.String.CharacterView.Index._measureExtendedGraphemeClusterForward (Swift.String.UnicodeScalarView.Index) -> Swift.Int + 140
frame #3: 0x00000001018af718 libswiftCore.dylib`generic specialization <Swift.String.CharacterView.Index with Swift.String.CharacterView.Index : Swift.ForwardIndexType in Swift, Swift.Int with Swift.Int : Swift._SignedIntegerType in Swift, Swift.Int with Swift.Int : Swift._BuiltinIntegerLiteralConvertible in Swift, Swift._DisabledRangeIndex_> of (extension in Swift):Swift.ForwardIndexType.distanceTo (A) -> A.Distance + 136
frame #4: 0x0000000101837d7c libswiftCore.dylib`protocol witness for Swift.ForwardIndexType.distanceTo (A) -> A.Distance in conformance Swift.String.CharacterView.Index : Swift.ForwardIndexType in Swift + 92
frame #5: 0x000000010174f088 libswiftCore.dylib`(extension in Swift):Swift.CollectionType.count.getter : A.Index.Distance + 244
frame #6: 0x0000000100201318 MyProject`static Regex.($0=0x0000000144d53960, index=2, text="..." -> [String]).(closure #1) + 396 at Regex.swift:87
frame #7: 0x0000000100201470 MyProject`thunk + 44 at Regex.swift:0
frame #8: 0x0000000101749704 libswiftCore.dylib`(extension in Swift):Swift.CollectionType.map <A> ((A.Generator.Element) throws -> A1) throws -> Swift.Array<A1> + 716
frame #9: 0x00000001001ffefc MyProject`static Regex.stringMatches(results=Swift.Array<Foundation.NSTextCheckingResult> @ 0x000000016fd993a8, text="...", index=2, self=MyProject.Regex) -> [String] + 564 at Regex.swift:93
frame #10: 0x0000000100200708 MyProject`static Regex.pregMatchAll(string="...", regex="<span(.*?)>(.*?)</span>", index=2, self=MyProject.Regex) -> [String] + 1972 at Regex.swift:65
frame #11: 0x000000010021aae0 MyProject`SwiftLinkPreview.(tag="span", content="...", self=0x0000000144b67f40)(String, content : String) -> String + 316 at SwiftLinkPreview.swift:480
frame #12: 0x000000010021a2e8 MyProject`SwiftLinkPreview.crawlCode(content="...", self=0x0000000144b67f40) -> String + 140 at SwiftLinkPreview.swift:449
frame #13: 0x000000010021b074 MyProject`@objc SwiftLinkPreview.crawlCode(String) -> String + 72 at SwiftLinkPreview.swift:0
frame #14: 0x0000000100218994 MyProject`SwiftLinkPreview.crawlTitle(htmlCode="...", self=0x0000000144b67f40) -> String + 912 at SwiftLinkPreview.swift:346
frame #15: 0x0000000100218ce0 MyProject`@objc SwiftLinkPreview.crawlTitle(String) -> String + 72 at SwiftLinkPreview.swift:0
frame #16: 0x000000010021533c MyProject`SwiftLinkPreview.(htmlCode="...", self=0x0000000144b67f40)(String) -> () + 196 at SwiftLinkPreview.swift:233
frame #17: 0x00000001002134f8 MyProject`SwiftLinkPreview.(completion=0x000000010021b1fc MyProject`partial apply forwarder for MyProject.SwiftLinkPreview.(preview (Swift.ImplicitlyUnwrappedOptional<Swift.String>, onSuccess : (Swift.Dictionary<Swift.String, Swift.AnyObject>) -> (), onError : (MyProject.PreviewError) -> ()) -> ()).(closure #1).(closure #1) at SwiftLinkPreview.swift, onError=0x00000001002139bc MyProject`partial apply forwarder for reabstraction thunk helper from @callee_unowned @convention(block) (@unowned MyProject.PreviewError) -> (@unowned ()) to @callee_owned (@owned MyProject.PreviewError) -> (@unowned ()) at SwiftLinkPreview.swift, self=0x0000000144b67f40)(() -> (), onError : (PreviewError) -> ()) -> () + 1656 at SwiftLinkPreview.swift:179
frame #18: 0x000000010021b950 MyProject`SwiftLinkPreview.(unshortened="www.youtube.com", self=0x0000000144b67f40, onSuccess=0x0000000100213938 MyProject`partial apply forwarder for reabstraction thunk helper from @callee_unowned @convention(block) (@unowned __ObjC.NSDictionary) -> (@unowned ()) to @callee_owned (@owned Swift.Dictionary<Swift.String, Swift.AnyObject>) -> (@unowned ()) at SwiftLinkPreview.swift, onError=0x00000001002139bc MyProject`partial apply forwarder for reabstraction thunk helper from @callee_unowned @convention(block) (@unowned MyProject.PreviewError) -> (@unowned ()) to @callee_owned (@owned MyProject.PreviewError) -> (@unowned ()) at SwiftLinkPreview.swift) -> (), onError : (PreviewError) -> ()) -> ()).(closure #1) + 500 at SwiftLinkPreview.swift:44
frame #19: 0x000000010021ca20 MyProject`SwiftLinkPreview.(completion=0x0000000100212d8c MyProject`partial apply forwarder for MyProject.SwiftLinkPreview.(preview (Swift.ImplicitlyUnwrappedOptional<Swift.String>, onSuccess : (Swift.Dictionary<Swift.String, Swift.AnyObject>) -> (), onError : (MyProject.PreviewError) -> ()) -> ()).(closure #1) at SwiftLinkPreview.swift, url="www.youtube.com")(NSURL, completion : (NSURL) -> ()) -> ()).(closure #1).(closure #2) + 76 at SwiftLinkPreview.swift:146