Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ("http://") in text or ("https://") in text:
- import re
- links = ['yandex', 'This is yandex https://yandex.ru/',
- 'rambler', 'This is rambler http://rambler.ru/index.php']
- s_links = ' '.join(links)
- pat = re.compile('https?://S+[w/]')
- print(re.findall(pat, s_links)) # ['https://yandex.ru/', 'http://rambler.ru/index.php']
Add Comment
Please, Sign In to add comment