0

This is the test code I'm working with. Please help

count = 0
        #find no of pages
        soup = BeautifulSoup(driver.page_source,"lxml")
        pages = list(soup.find('div',{'id':'listForm:table_paginator_bottom'}).span.text)[-2]
        pages  = int(pages)
        #find no of docs
        docs = int(soup.find('table',{'class':'top-level'}).text.split()[-2])
        for k in range(docs):
            while docs != count:
                count = count + 1
                driver.find_element_by_id(str("listForm:table:"+str(k)+":showDetail").click()
                soup2 = BeautifulSoup(driver.page_source,"lxml")

I have tried all option changed the logic completely and reworked tried documentation and few methods, didn't work.

File "", line 31 soup = BeautifulSoup(driver.page_source,"lxml") ^ SyntaxError: invalid syntax

This is the error I'm getting even tried changing IDE

Likith
  • 1
  • 1
  • 1
    missing a bracket on line above – Sayse Jun 05 '20 at 16:34
  • 2
    https://stackoverflow.com/q/24237111/1324033 – Sayse Jun 05 '20 at 16:35
  • Looks like an indentation issue, or it could be that the way you pasted your code made it appear this way. If, however, the code is exactly as you pasted it, the second line is indented, which it should not be. Additionally, @Sayse commented correctly on another line where you have a missing right parenthesis. – Amitai Irron Jun 05 '20 at 16:42

0 Answers0