Skip to content

Commit 7a3230f

Browse files
style: format code with autopep8
Format code with autopep8 This commit fixes the style issues introduced in 98d3266 according to the output from Autopep8. Details: https://app.deepsource.com/gh/avinashkranjan/Amazing-Python-Scripts/transform/98a4c7ff-3ed1-4392-8b14-01c6f2f82bbe/
1 parent 7f21d37 commit 7a3230f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Facebook_Request_Acceptor_Script/Facebook_Request_Acceptor_Script.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,21 @@
88

99
# Configure Chrome options
1010
chrome_options = Options()
11-
chrome_options.add_experimental_option("prefs", {"profile.default_content_setting_values.notifications": 2})
11+
chrome_options.add_experimental_option(
12+
"prefs", {"profile.default_content_setting_values.notifications": 2})
1213

1314
# Load environmental variables from .env file
1415
load_dotenv(dotenv_path=Path(".", ".env"))
1516

1617
# Read credentials from environmental variables
18+
19+
1720
def read_creds():
1821
return {"username": os.getenv("username"), "password": os.getenv("password")}
1922

2023
# Function for accepting requests
24+
25+
2126
def accept_requests(browser):
2227
browser.get("https://www.facebook.com/friends")
2328
element_id = browser.find_element_by_css_selector("input#email")
@@ -27,7 +32,8 @@ def accept_requests(browser):
2732
element_id.submit()
2833

2934
while True:
30-
confirm_btns = browser.find_elements_by_css_selector("div[aria-label='Confirm']")
35+
confirm_btns = browser.find_elements_by_css_selector(
36+
"div[aria-label='Confirm']")
3137
if not confirm_btns:
3238
break
3339

@@ -44,6 +50,7 @@ def accept_requests(browser):
4450
except:
4551
pass
4652

53+
4754
def main():
4855
# Initialize Chrome browser with options
4956
browser = webdriver.Chrome(options=chrome_options)
@@ -56,5 +63,6 @@ def main():
5663
print("All Request Accepted")
5764
browser.quit()
5865

66+
5967
if _name_ == "_main_":
60-
main()
68+
main()

0 commit comments

Comments
 (0)