Skip to content

Commit

Permalink
Update parsers.py
Browse files Browse the repository at this point in the history
Update status code check to httpx
  • Loading branch information
IDmedia authored Sep 9, 2024
1 parent f0c4800 commit 96adb2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ async def shares(self, msg_data, create_config):
}
r = await http.request("GET", url=f'{self.unraid_url}/webGui/include/ShareList.php', data=data, headers=headers, timeout=600)

if r.ok:
if r.status_code == httpx.codes.OK:
tree = etree.HTML(r.text)

size_total_used = tree.xpath(f'//td/a[text()="{share_nameorig}"]/ancestor::tr[1]/td[6]/text()')
Expand Down

0 comments on commit 96adb2a

Please sign in to comment.