mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
17 lines
341 B
Python
Executable file
17 lines
341 B
Python
Executable file
#!/usr/bin/python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import sys
|
|
|
|
def get_file(link, char):
|
|
'''
|
|
Get filename from links
|
|
'''
|
|
i = 0
|
|
results = []
|
|
for file in range(len(link)):
|
|
i -= 1
|
|
results.append(link[i])
|
|
if link[i] == char:
|
|
break
|
|
return ''.join(results[::-1]).replace('/', '').strip(' ')
|