Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
Added more converters for stickers
Browse files Browse the repository at this point in the history
  • Loading branch information
veloc1 committed Jan 22, 2020
1 parent 2a17908 commit c3655c3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions converters/stickers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ def replace_sticker(text):
if text:
pattern = r'<img src="\/common\/templates\/skin\/start-kit\/assets\/images\/(.*?)\..*?">'
items = re.findall(pattern, text)
for i in items:
stickers_set.add(i)
text = re.sub(pattern, r':\1:', text)

pattern = r'<img src="\/common\/templates\/skin\/start-kit\/assets\/images\/(.*?)\..*?" />'
items = re.findall(pattern, text)
for i in items:
stickers_set.add(i)
text = re.sub(pattern, r':\1:', text)

pattern = r'<img src="http:\/\/k.faisu.net\/kreguzda\/images\/smilies\/(.*?)\..*?" />'
items = re.findall(pattern, text)
for i in items:
stickers_set.add(i)
return re.sub(pattern, r':\1:', text)
Expand Down

0 comments on commit c3655c3

Please sign in to comment.