mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-11 20:58:29 +03:00
20 lines
525 B
Python
20 lines
525 B
Python
import re
|
|
|
|
class UrlUtil:
|
|
telegram_private = re.compile(r"https:\/\/t\.me(\/c)\/(.+)\/(\d+)")
|
|
is_istagram = re.compile(r"https:\/\/www\.instagram\.com")
|
|
|
|
@staticmethod
|
|
def clean(url): return url
|
|
|
|
@staticmethod
|
|
def is_auth_wall(url):
|
|
"""
|
|
checks if URL is behind an authentication wall meaning steps like wayback, wacz, ... may not work
|
|
"""
|
|
if UrlUtil.telegram_private.match(url): return True
|
|
if UrlUtil.is_istagram.match(url): return True
|
|
|
|
return False
|
|
|