
齐趣 
0 思源+插件1年前云南

鼠子 
0 @于小丘1年前山东

免费网创项目:onezhuanone.com
作者0 # wordpress配置 WP_URL = "https://xxx.com/wp-json/wp/v2/posts" WP_USERNAME = "xxxxxxx" WP_APP_PASSWORD = "xxxxxxxxx" # 发布文章到wordpress def upload_to_wordpress(title, content): article = { "title": title, "content": content, "status": "publish", "categories": [166], } credentials = base64.b64encode(f"{WP_USERNAME}:{WP_APP_PASSWORD}".encode()).decode() headers = { "Authorization": f"Basic {credentials}", "Content-Type": "application/json" } try: response = requests.post(WP_URL, json=article, headers=headers) return response.status_code == 201 except requests.RequestException as e: print(f"请求失败: {e}") return False1年前浙江

落魄的书生 
1 看这个文章https://www.zibll.top/forum-post/8544.html 将他的采集规则的php文件上传到wordpress的根目录(记得改密钥)1年前四川已采纳
回答4
只看作者最新最热






