Skip to content
Merged
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
6 changes: 5 additions & 1 deletion ghorgs/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def get_paged_content(self, session: requests.Session, url: str) -> list:
all_data = []
current_url = url
last_url = None
while last_url != current_url:
while True:
response = session.get(current_url)
retry_after_raw = response.headers.get('Retry-After', None)
if retry_after_raw:
Expand All @@ -143,6 +143,10 @@ def get_paged_content(self, session: requests.Session, url: str) -> list:
assert isinstance(data, list)
all_data.extend(data)

# Need to move this check here and change to 'while True' so the last page of the gitbub project will be processed
if current_url == last_url:
break

# check header
if 'Link' in response.headers:
# parse
Expand Down