Skip to content

Instantly share code, notes, and snippets.

@sertalpbilal
Last active February 20, 2021 03:53
Show Gist options
  • Save sertalpbilal/5b241eff7a707a03b2241f84cf7ddb04 to your computer and use it in GitHub Desktop.
Save sertalpbilal/5b241eff7a707a03b2241f84cf7ddb04 to your computer and use it in GitHub Desktop.
Useful parts for microcenter scraper
import requests
result = requests.get(r'https://www.microcenter.com/product/630283/amd-ryzen-9-5900x-vermeer-37ghz-12-core-am4-boxed-processor?storeid=071')
print(result.status_code) # This should be 200 if all goes OK
print(result.text) # This text will go to Beautiful Soup
from bs4 import BeautifulSoup
result = requests.get('...')
soup = BeautifulSoup(result.text, 'html.parser')
count = soup.find(class_='inventoryCnt')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment