AttributeError: 'NoneType' object has no attribute 'group' #1

Closed
opened 2023-11-18 10:20:21 +00:00 by edward · 0 comments
Owner
/home/edward/src/2019/newegg_hdd/data/2023-11-18/internal_35_page01.html
https://www.newegg.com/Product/ProductList.aspx?Submit=ENE&N=100167523+8000+4814+600003489&IsNodeId=1&ActiveSearchResult=True&Order=RELEASE&PageSize=96
2023-11-18 08:50:01,696 [4104809] INFO     __main__ [page: 1] [label: 3.5" internal drives]: get internal_35
2023-11-18 08:50:01,866 [4104809] CRITICAL root: Traceback (most recent call last):
  File "/home/edward/src/2019/newegg_hdd/crawl.py", line 299, in <module>
    get_pages()
  File "/home/edward/src/2019/newegg_hdd/crawl.py", line 135, in get_pages
    page_count = get_page_count(page_content)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/edward/src/2019/newegg_hdd/crawl.py", line 150, in get_page_count
    return int(re_page.search(html).group(1))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'
``` /home/edward/src/2019/newegg_hdd/data/2023-11-18/internal_35_page01.html https://www.newegg.com/Product/ProductList.aspx?Submit=ENE&N=100167523+8000+4814+600003489&IsNodeId=1&ActiveSearchResult=True&Order=RELEASE&PageSize=96 2023-11-18 08:50:01,696 [4104809] INFO __main__ [page: 1] [label: 3.5" internal drives]: get internal_35 2023-11-18 08:50:01,866 [4104809] CRITICAL root: Traceback (most recent call last): File "/home/edward/src/2019/newegg_hdd/crawl.py", line 299, in <module> get_pages() File "/home/edward/src/2019/newegg_hdd/crawl.py", line 135, in get_pages page_count = get_page_count(page_content) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/edward/src/2019/newegg_hdd/crawl.py", line 150, in get_page_count return int(re_page.search(html).group(1)) ^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'group' ```
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: edward/newegg-hdd#1
No description provided.