我必须使用python从其他网站获取数据并将该数据发布到odoo
,这可能吗?
我已经尝试在odoo
中创建python文档中的记录,但我不认为它可以自动生成,我的目标是自动将数据从该网站发布到odoo
,但我的问题我不知道如何将数据发布到odoo
自动,请帮帮我
也许Selenium可以帮到你 Selenium自动化支持Internet Explorer,Chrome,Firefox等的浏览器 你可以发送钥匙和点击按钮,其他所有东西。
登录示例:
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