myLib.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:INCWO_auto_synchr 作者: vaelastrazs 项目源码 文件源码
def create_product(product_infos):
    xml_data = prepare_xml_product(product_infos)
    url="https://www.incwo.com/"+str(ID_USER)+"/customer_products.xml"
    # print("sending create (POST request) to ",url," ...")
    response = send_request("post", url, xml_data)
    product_id = 0
    for l in response.splitlines():
        if "<id>" in l:
            product_id = extract_value_from_xml(l)
            print("product "+product_infos["name"]+" created with id "+product_id)
            # log.debug(response)
            break
    if (product_id != 0):
        manage_stock_movement(product_infos, product_id, None)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号