0
Das ist mein PHP-Code PHP-Code funktionierenExtrahieren von Daten aus JSON API mit Python 2.7
$json = file_get_contents('http://examole.com/api.php');
$obj = json_decode($json,true);
foreach($obj as $row)
{
echo ($row["first_name"]);
echo "<br>";
}
Dieser Code meine Python ist
from urllib import urlopen
import simplejson as json
url=urlopen('http://examole.com/api.php')
result = json.loads(url)
print utl.get('first_name').get('data')
Was ist das Problem? Fügen Sie auch eine Probe JSON, die Sie versuchen zu analysieren – ZdaR
Python-Datei funktioniert nicht ich bekomme IOError: [Errno Socket-Fehler] [Errno 110] Zeitüberschreitung der Verbindung dieser Fehler –
Dann gibt es ein Problem mit der http: // Examenole. com/api.php – ZdaR