# pip install -U requests
# pip install -U beautifulsoup4
import requests
from bs4 import BeautifulSoup
url = 'https://www.allonpage.com'
r = requests.get(url)
html_contents = r.text
html_soup = BeautifulSoup(html_contents, "html.parser")
print(html_soup.find_all('h2'))
'''
run:
[<h2 class="entry-title"><a href="https://www.allonpage.com/products/" rel="bookmark">Products</a></h2>,
<h2 class="entry-title"><a href="https://www.allonpage.com/best-hair-removal-products/" rel="bookmark">Best Hair Removal Products</a></h2>,
<h2 class="entry-title"><a href="https://www.allonpage.com/useful-vlc-keyboard-shortcuts/" rel="bookmark">Useful VLC Keyboard Shortcuts</a></h2>,
<h2 class="entry-title"><a href="https://www.allonpage.com/6-best-photo-editors-software-for-windows/" rel="bookmark">6 Best Photo Editors Software for Windows</a></h2>,
<h2 class="entry-title"><a href="https://www.allonpage.com/20-best-c-programming-books-for-beginners-intermediates-and-advanced-programmers/" rel="bookmark">20 Best C Programming Books for Beginners, Intermediates and Advanced Programmers</a></h2>,
<h2>Beginners</h2>,
<h2>Intermediate</h2>, <h2>Advanced</h2>, <h2>Reference Books – All Levels</h2>, <h2 class="entry-title"><a href="https://www.allonpage.com/5-best-screen-capture-software/" rel="bookmark">5 Best Screen Capture Software</a></h2>,
<h2 class="entry-title"><a href="https://www.allonpage.com/5-best-teeth-whitening-products/" rel="bookmark">5 Best Teeth Whitening Products</a></h2>,
<h2 class="entry-title"><a href="https://www.allonpage.com/6-best-acne-treatment-products/" rel="bookmark">6 Best Acne Treatment Products</a></h2>,
<h2 class="entry-title"><a href="https://www.allonpage.com/9-best-ways-to-learn-how-to-draw/" rel="bookmark">9 Best Ways To Learn How To Draw</a></h2>,
...]
'''