python 3.3 search for match in webpage results
Good day, I have the following code, I am wondering how to search the
results for a match? I will be trying to match two to three words. I have
tried html2text, beautifulsoup, re.search, and several others. Wether ive
not implemented the things ive tried correctly, or they just dont work.
import requests
s = requests.session()
url = 'http://company.name.com/donor/index.php'
values = {'username': '1234567',
'password': '7654321'}
r = s.post(url, data=values)
# page which requires being logged in to view
url = "http://company.name.com/donor/donor.php"
# sending cookies as well
result = s.get(url)
Ive tried many different ways, just cant get it. I am wondering which
module I will need to be working with? And will i need to change the form
of data that "result" is in? One thing I havent tried is writing "result"
to a text file. I guess I could do that, and then search for my matches in
that file... Im just thinking there is a very simple way to do this.
thanks for any help or direction
No comments:
Post a Comment