import urllib.request, json token = open('/home/hermes/.hermes/joomla_token.txt').read().strip() with open('/home/hermes/workspace/artikel_catan_usa_2026_clean.html') as f: full_text = f.read() # Get title from API req = urllib.request.Request( 'https://www.brettspiel-news.de/api/index.php/v1/content/articles/15425', headers={'Accept':'application/vnd.api+json','X-Joomla-Token':token}) r = json.loads(urllib.request.urlopen(req, timeout=10).read()) title = r['data']['attributes']['title'] # ALLES als fulltext, kein introtext payload = { 'title': title, 'introtext': '', 'fulltext': full_text, 'state': 1 } req2 = urllib.request.Request( 'https://www.brettspiel-news.de/api/index.php/v1/content/articles/15425', data=json.dumps(payload, ensure_ascii=False).encode(), headers={'Accept':'application/vnd.api+json','Content-Type':'application/json','X-Joomla-Token':token}, method='PATCH') try: resp = urllib.request.urlopen(req2, timeout=15) r2 = json.loads(resp.read()) a = r2['data']['attributes'] t = a.get('text','') print(f"HTTP 200 | State={a['state']}") print(f"Textlaenge: {len(t)} chars") print(f"