Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. def clean_data (article):
  2. ans = ''
  3. ab = article.get('content').get('blocks')
  4. for i in range(len(ab)):
  5. a = ab[i].get('data')
  6. if (type(a) == type ('dfdf')):
  7. d = (re.sub(r'<[^<]+?>', '',a, count=0))
  8. ans += '\n' + d
  9. return ans
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement