Skip to content

Instantly share code, notes, and snippets.

@alixaprodev
Created December 5, 2021 17:50
Show Gist options
  • Save alixaprodev/b96b08796f7c4bd97484ba7adb59e663 to your computer and use it in GitHub Desktop.
Save alixaprodev/b96b08796f7c4bd97484ba7adb59e663 to your computer and use it in GitHub Desktop.
scrape website using python
import requests
import urllib.request
import time
from bs4 import BeautifulSoup
url = 'https://www.amazon.com/s?k=python+books&ref=nb_sb_noss_2'
response = requests.get(url)
htmldata = BeautifulSoup(response.text, "html.parser")
print(htmldata)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment