Hello I am new to Python and am trying to figure out why my list overwrites the previous elements every time a new page is loaded and scraped during the while loop. Thank you in
You need to initialize the URL list before the loop. If you initialize inside the loop it sets it back to nothing every time.