Quantcast
Channel: python Get a link from string - Stack Overflow
Browsing latest articles
Browse All 4 View Live

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 Article


Answer 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 Article


Answer 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 Article

python 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
Browsing latest articles
Browse All 4 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>