My code: seleniumURLs.py

seleniumURLs.py contains the code to retrieve all the URLs given a medium tag page! As shown in my code above, we use Selenium python package to navigate to the AI medium tag page (https://medium.com/tag/artificial-intelligence) and use BeautifulSoup python package to parse the HTML page and retrieve all the hyperlinks, specifically the links of top medium articles. The AI medium tag page contains the top 10 medium articles within the AI category. By running seleniumURLs.py, we will be able to retrieve the links of these top 10 medium articles as shown in the terminal picture below.

Output

Ryan

Ryan

Data Scientist

Leave a Reply