Skip to content

Commit

Permalink
Merge pull request #22 from qresp-code-development/hotfix/file-server…
Browse files Browse the repository at this point in the history
…-parser

Fixed file server parser to work with new file server
  • Loading branch information
mgovoni-devel authored Sep 25, 2020
2 parents aa1436a + 1513e4e commit 97244cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/project/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ def fetchForTreeFromHttp(self):
"""
page = requests.get(self.__path, headers=self.__headers, verify=False)
tree = html.fromstring(page.content)
for xtag in tree.xpath('//li/a'):
file = xtag.text_content().strip()
if 'Parent Directory' not in file:
for xtag in tree.xpath('//table//tr/td[2]/a'):
name, file = xtag.text_content().strip(), xtag.attrib['href']
if 'Parent Directory' not in name:
dataFile = DirectoryTree()
dataFile.title = file
dataFile.title = name
parent = self.__path.split("/")
parentName = parent[len(parent) - 2]
dataFile.key = self.__path + "/" + file.strip("/")
Expand Down

0 comments on commit 97244cd

Please sign in to comment.