File size: 580 Bytes
cc65c1f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
async def process_link(href) : 

    if (
        href and 
        isinstance(href , str) and  
        not href.startswith('mailto:') and
        not href.endswith('png') and 
        not href.endswith('jpg') and
        not href.endswith('jpeg') and
        not href.endswith('gif') and
        not href.endswith('bmp') and
        not href.endswith('tiff') and
        not href.endswith('svg') and
        not href.endswith('webp') and 
        not href.endswith('webm') and
        not href.endswith('mp4') # ! Add conditions as needed 
    ) : return href

    return None