Problem scenario
How do you write a Python 3 program to parse the text of a web page and determine if a string is on the web page or not?
Solution
Change the “yoururl” variable assignment and the “searchterm” assignment below to what you desire. Then run the program below:
import re
import requests
yoururl = ‘https://www.continualintegration.com/’
searchterm = “learned”
r = requests.get(yoururl)
found = re.search(searchterm, …
Continue reading “How Do You Get Python to Search a Web Page for a Specific Pattern?”
