From b4cc93e133335f692d318ccd3d7b282fe11c83a4 Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Fri, 22 Dec 2023 12:32:17 -0500 Subject: [PATCH] return null on page not existing --- gl_doc_generator.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gl_doc_generator.py b/gl_doc_generator.py index 09428de..a55a2f0 100644 --- a/gl_doc_generator.py +++ b/gl_doc_generator.py @@ -174,6 +174,10 @@ def process_page(url): soup = open_url(url) ref = soup.find("div", class_="refentry") + if ref is None: + print("NULL") + return + name_div = ref.find("div", class_="refnamediv") cspec_div = ref.find("div", class_="refsynopsisdiv").find("div", class_="funcsynopsis") parameters_div = ref.find("div", id="parameters")