Skip to content

Commit 278d71b

Browse files
authored
Update README.md
1 parent 96a8c80 commit 278d71b

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,23 @@ I've been solving LeetCode problems recently, and when I realized that why not p
55

66
At the begining, I found a useful dependency in python called ```BeautifulSoup```, but it seems that it is not able to deal with dynamic website, which means that if some elements shown in a website is controlled by javascript. After serching for a while, I found ```selenium```, which automatically controll website like a human, but it seems that it is unefficient to use selenium to parse data in html, so I combine BeautifulSoup and selenium to finish this project.
77

8-
#### install dependencies
8+
#### Install dependencies
99
```
1010
# pip install bs4
1111
# pip install beautifulsoup
1212
# pip install selenium
1313
```
1414

15-
#### install ChromeDriver
15+
#### Install ChromeDriver
1616
This project use [chromedriver](http://chromedriver.chromium.org/) in selenium, before running this project, you have to add the downloaded executable file to PATH enviroment variable.
1717

1818
#### Setting
1919
You have to modify some of the variable in the project as shown below.
2020
```
21-
Account = 'YOUR_ACCOUNT'
22-
Password = 'YOUR_PASSWORD'
23-
driver = webdriver.Chrome('THE_ABSOLUTE_PATH_OF_CHROMEDRIVER_THAT_YOU_JUST_INSTALLED')
21+
Account = "YOUR_ACCOUNT"
22+
Password = "YOUR_PASSWORD"
23+
directory = "THE_ABSOLUTE_PATH_THAT_YOU_WANT_TO_SAVE_FILES"
24+
driver = webdriver.Chrome("THE_ABSOLUTE_PATH_OF_CHROMEDRIVER_THAT_YOU_JUST_INSTALLED")
2425
```
2526

2627
#### Execute
@@ -29,7 +30,4 @@ After executing the project, each LeetCode problem that you've solved will have
2930
I tried this project on Windows10 & Ubuntu, and it works fine.
3031

3132
#### To Do
32-
there are still some weired part that i haven't solved, but it's not affecting the result
33-
1. web page loaded problem: it seems that there is some problem to wait for the page fully loaded while using selenium, so I currently use ```time.sleep()```, which is the worst solution.
34-
35-
2. Currently, this project will only save the latest accepted submission code.
33+
1. Currently, this project will only save the latest accepted submission code.

0 commit comments

Comments
 (0)