Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/update posts full crawling #74

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions inscrawler/crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,6 @@ def check_next_post(cur_key):

# Fetching post detail
try:
if(i < num):
check_next_post(all_posts[i]['key'])
i = i + 1

# Fetching datetime and url as key
ele_a_datetime = browser.find_one(".eo2As .c-Yi7")
cur_key = ele_a_datetime.get_attribute("href")
Expand Down Expand Up @@ -245,6 +241,9 @@ def check_next_post(cur_key):
dict_posts[browser.current_url] = dict_post

pbar.update(1)
if(i < num):
browser.get(all_posts[i]['key'])
i = i + 1

pbar.close()
posts = list(dict_posts.values())
Expand Down