Toggle navigation
Toggle navigation
This project
Loading...
Sign in
최원석
/
2021-1-database-project
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
1seok2
2021-03-07 21:52:15 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ba5a0a0cec760a573e8141148be1dfe771791782
ba5a0a0c
1 parent
b8f1f0ea
delete useless code
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
config/URLs.py
crawler/crawler_instagram.py
config/URLs.py
View file @
ba5a0a0
INSTAGRAM_URL
=
"https://instagram.com"
\ No newline at end of file
INSTAGRAM_URL
=
"https://instagram.com"
...
...
crawler/crawler_instagram.py
View file @
ba5a0a0
import
time
import
selenium
from
selenium
import
webdriver
from
selenium.webdriver.common.keys
import
Keys
from
config.admin
import
ID
,
PW
from
config.admin
import
ID
,
PW
,
LOCAL_PROJECT_PATH
from
config.URLs
import
INSTAGRAM_URL
from
config.firebase
import
update_data
def
check_people
(
driver
,
type
):
result
=
[]
navigations
=
driver
.
find_elements_by_class_name
(
'-nal3'
)
if
type
==
"followers"
:
...
...
@@ -44,11 +42,12 @@ def get_list(insta_id, driver):
# check followings
following_list
=
check_people
(
driver
,
"following"
)
# update at firebase
update_data
(
insta_id
,
followers_list
,
following_list
)
def
crawler_instagram
(
insta_id
):
driver
=
webdriver
.
Chrome
(
executable_path
=
'/Users/choewonseog/Documents/check-your-instagram
/crawler/chromedriver'
)
driver
=
webdriver
.
Chrome
(
executable_path
=
LOCAL_PROJECT_PATH
+
'
/crawler/chromedriver'
)
driver
.
get
(
url
=
INSTAGRAM_URL
)
time
.
sleep
(
4
)
...
...
Please
register
or
login
to post a comment