Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def clean_data (article):
- ans = ''
- ab = article.get('content').get('blocks')
- for i in range(len(ab)):
- a = ab[i].get('data')
- if (type(a) == type ('dfdf')):
- d = (re.sub(r'<[^<]+?>', '',a, count=0))
- ans += '\n' + d
- return ans
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement