mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
* Populate URLs from legacy fields * Return nil properly in xpath/json scrapers * Improve migration logging
18 lines
365 B
Go
18 lines
365 B
Go
package performer
|
|
|
|
import (
|
|
"regexp"
|
|
)
|
|
|
|
var (
|
|
twitterURLRE = regexp.MustCompile(`^https?:\/\/(?:www\.)?twitter\.com\/`)
|
|
instagramURLRE = regexp.MustCompile(`^https?:\/\/(?:www\.)?instagram\.com\/`)
|
|
)
|
|
|
|
func IsTwitterURL(url string) bool {
|
|
return twitterURLRE.MatchString(url)
|
|
}
|
|
|
|
func IsInstagramURL(url string) bool {
|
|
return instagramURLRE.MatchString(url)
|
|
}
|