Answer by sonus21 for python Get a link from string
The email could in HTML or text format.If it's in HTML format then use libraries like bs4, pyquery etc.If it's text then use regex to search the URL using the following regexregex =...
View ArticleAnswer by G_M for python Get a link from string
Assuming that dict from your description is now in a variable named d (it was just a bit long to put in here):>>> from bs4 import BeautifulSoup>>> soup = BeautifulSoup(d['body'],...
View ArticleAnswer by Mauricio Cortazar for python Get a link from string
You can use regex for that with something like:import rec = re.search("<a href=\".*?(?=\")", yourDict["body"].decode("utf-8"))print(c.group())but is much better if you find a package like parsel...
View Articlepython Get a link from string
I need to use a python script to take a email and fine a link from it and them open use that link to send a packet to a server that has that verification link inside of it so it verifies an account....
View Article