This code can scrape countries list from https://www.worldometers.info/geography/alphabetical-list-of-countries/ without opening a browser. The browser runs into backend mode. To run this code, you should install selenium library in your PC. pip install selenium Then run the bot. py headless.py