Generalize YouTube regex
This commit is contained in:
parent
1f2a725f4d
commit
dc56e3ebe2
|
@ -1,5 +1,5 @@
|
||||||
import strutils, strformat, sequtils, times, uri, tables
|
import strutils, strformat, times, uri, tables
|
||||||
import xmltree, htmlparser, htmlgen
|
import xmltree, htmlparser
|
||||||
import regex
|
import regex
|
||||||
|
|
||||||
import types, utils, query
|
import types, utils, query
|
||||||
|
@ -7,7 +7,7 @@ import types, utils, query
|
||||||
from unicode import Rune, `$`
|
from unicode import Rune, `$`
|
||||||
|
|
||||||
const
|
const
|
||||||
ytRegex = re"(www.|m.)?youtu(be.com|.be)"
|
ytRegex = re"([A-z.]+\.)?youtu(be.com|.be)"
|
||||||
twRegex = re"(www.|mobile.)?twitter.com"
|
twRegex = re"(www.|mobile.)?twitter.com"
|
||||||
nbsp = $Rune(0x000A0)
|
nbsp = $Rune(0x000A0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue