slpkg/slpkg/functions.py
2014-07-26 07:59:53 +03:00

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(' ')