Created
February 9, 2022 10:13
-
-
Save SubhadityaMukherjee/a29f16d0718c53302f9897b95ce09dcc to your computer and use it in GitHub Desktop.
mai loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i, site in tqdm(enumerate(sites.split(",")), total=len(sites.split(","))): | |
site = f"https://github.com/{user_name}/{site}" | |
repo_name = str(site).split("/")[-1].strip() | |
# Go to site | |
browser.get(site+"/settings") | |
# Choose organization | |
puts = to_put[i] | |
if puts == "D": | |
browser.find_element_by_xpath( | |
'//*[@id="options_bucket"]/div[10]/ul/li[4]/details/summary').click() | |
chain_actions( | |
actions, [f"{user_name}/{repo_name}", Keys.TAB, Keys.ENTER]) | |
else: | |
puts -=1 | |
browser.find_element_by_xpath( | |
"/html/body/div[6]/div/main/div[2]/div/div/div[2]/div/div/div/div[10]/ul/li[2]/form/details/summary").click() | |
chain_actions(actions, [list_of_orgs[puts], Keys.TAB, | |
f"{user_name}/{repo_name}", Keys.TAB, Keys.ENTER]) | |
time.sleep(2) | |
browser.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment