Hi all,
I just started learning Python and Beautiful Soup. I am developing a script to look for particular text "Running" in the HTML. If that text "Running" exits, I would like to print out the keyword "QSAJK". Please see the attached image to visualize. If there is one or more text of "Running", the script should also print out respective keywords. Below is my code to open the webpage and search for the text. How should I modify to fulfill my requirements. Thank you very much in advance.
import time
import urllib2
import re
from BeautifulSoup import BeautifulSoup
from BeautifulSoup import NavigableString
def Check_Tester():
soup = BeautifulSoup(urllib2.urlopen("http://compat.sing.seagate.com/servlets/ReportMgrSecure?REPORT=rebootManager&RACK=SG-HFT-15&CLOSE=1&ORDERBY=sporder").read())
Key_Word = soup.findAll('td',text='Running')
def main():
Check_Tester()
main()