自动将数据从其他网站发布到od

2024-04-23 12:23:22 发布

您现在位置:Python中文网/ 问答频道 /正文

我必须使用python从其他web获取数据并将数据发布到odoo,这可能吗?你知道吗

我已经尝试过在odoo中用类似python的文档创建记录,但我认为它不能自动创建,我的目标是自动将数据从该站点发布到odoo,但我的问题是我不知道如何自动将数据发布到odoo,请帮助我


Tags: 数据文档odooweb目标站点记录
1条回答
网友
1楼 · 发布于 2024-04-23 12:23:22

也许硒可以帮助你
Selenium自动化了支持Internet Explorer、Chrome、Firefox的浏览器。。。等
你可以发送按键和点击按钮,其他所有的事情。你知道吗

odoo登录示例:

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

driver = webdriver.Chrome('chromedriver.exe')
driver.find_element_by_xpath('//*[@id="wrapwrap"]/header/div/div/div/a').click() // click the SIGN IN button
WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.XPATH, //*[@id="login"]))) // wait the login page
driver.find_element_by_xpath('//*[@id="login"]').send_keys('your id') // send your id the web
driver.find_element_by_xpath('//*[@id="password"]').send_keys('your pw') // send your pw the web

相关问题 更多 >