🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How to access JSON data from UnitV2 AI Camera?

    SOFTWARE
    unitv2
    2
    3
    6.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • bjone6B
      bjone6
      last edited by

      I'm using normal Python to access the UnitV2 camera and it works but I can't get the JSON data from any of the modules. Here's where I'm at so far.

      import requests
      from lxml import html

      r = requests.get('http://10.254.239.1')
      status = r.status_code
      tree = html.fromstring(r.content)
      *** When I inspect the page, this is where the JSON data is stored but I don't get anything from this.***
      json = tree.xpath('//*[@id="func-result-pre"]')
      print(json)

      1 Reply Last reply Reply Quote 1
      • AsmodevA
        Asmodev
        last edited by Asmodev

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • AsmodevA
          Asmodev
          last edited by Asmodev

          SOLVED IT!
          Here, You can use this, hope it helps out!
          UNITV2 WEB RESULT RESPONSE

          1 Reply Last reply Reply Quote 0
          • First post
            Last post