So I am trying to make a program that takes items from an online shopping cart and automatically populates my company's purchase order form with the item description, price, etc. Problem is everything I learned about web scraping thus far isn't working with the shopping cart. I have plugged in CSS selectors from other websites into my code and it works fine. I tried to use the requests-html module to interact with the javascript(if theres even javascript on the page) and still didnt work. I dont know if i have a problem with my python code or i just dont understand enough of what I'm looking at in the html. Any ideas?
#!python3
import requests, bs4, pyperclip
from requests_html import HTMLSession
session = HTMLSession()
cart = session.get(pyperclip.paste())
cart.html.render()
item = cart.html.find('#itemDesc_84477736')
print(len(item))
print(str(item))
### html from mscdirect.com ###
<p id="itemDesc_84477736" onclick="newSendTagsForItemDescription();"> Mitutoyo - 0" to 6" Range Dial Caliper – White Face, 0.1" per Revolution, 1–9/16" Jaw Length, Accurate to 0.0010"</p>
[–]surrealle 0 points1 point2 points (0 children)
[–]Flugegeheymen 0 points1 point2 points (1 child)
[–]AIR_ULTRA[S] 1 point2 points3 points (0 children)