I have a text fragment:
.....https://www.one.com/privacy/\............http://two.com/terms/'.............https://three.com/pricing/\..........https://four.com/widget/wg74ythx;.........http://five.com/pricing .........
My code for extracting web links:
link = re.compile(r'https?://(\w.*?)(\\|;|\'|\s)')
But I need to exclude from my results all links with the words "privacy" or "widget". I`m stuck here, and I need the help of the community.