The source for the URL regex [1] is this stack overflow comment:
https://stackoverflow.com/a/16425824/182469
There also appear to be elements from this question, such as the report method ([2]), but it's definitely been adapted (or there's a different source):
https://stackoverflow.com/q/44252745/182469
[1]: https://github.com/falleng0d/ai-downloader/blob/18dde6c9f9f5...
[2]: https://github.com/falleng0d/ai-downloader/blob/18dde6c9f9f5...