zoukankan      html  css  js  c++  java
  • 授权QQ登录的qq端前端页面变迁

        ac_type = 'qq'
        if ac_type == 'qq':
            myid, mypwd = qq_key
            xp = '/html/body/div/div/div[2]/div/div/div/ul/li[3]'
            # udp
            xp = '/html/body/div/div/div[2]/div/div/div/ul/li[2]'
            browser.find_element_by_xpath(xp).click()
            time.sleep(random.randint(3, 10))
            browser.refresh()
            for rp in range(3):
                try:
                    browser.switch_to.frame('ptlogin_iframe')
                    js = 'document.getElementById("bottom_qlogin").childNodes[0].click()'
                    browser.execute_script(js)
                    break
                except Exception as e:
                    print(e)
                    browser.refresh()
                    time.sleep(2)
                    continue
            time.sleep(random.randint(3, 10))
            js = '%s%s%s' % ('document.getElementById("u").value="', myid, '"')
            browser.execute_script(js)
            js = '%s%s%s' % ('document.getElementById("p").value="', mypwd, '"')
            browser.execute_script(js)
            time.sleep(random.randint(5, 15))
            # old ori
            # xp_newpage = '//*[@id="go"]'
            # browser.find_element_by_xpath(xp_newpage).click()
            js = 'document.getElementById("login_button").click()'
            browser.execute_script(js)
            time.sleep(random.randint(1, 10))
    

      

  • 相关阅读:
    P2149 [SDOI2009]Elaxia的路线
    P1346 电车
    P3174 [HAOI2009]毛毛虫
    P3047 [USACO12FEB]附近的牛Nearby Cows
    P4053 [JSOI2007]建筑抢修
    P2607 [ZJOI2008]骑士
    [HNOI2006]马步距离
    [POI2014]Hotel
    [BZOJ3856]Monster
    [BZOJ2819]Nim
  • 原文地址:https://www.cnblogs.com/rsapaper/p/9073435.html
Copyright © 2011-2022 走看看