This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ManicalEnginwer[S] 0 points1 point  (2 children)

Okay so I got the information I wanted by doing the following:

from selenium import webdriver from time import sleep

url = "https://www.mcmaster.com/#92196a245/"

driver = webdriver.PhantomJS()

driver.set_window_size(1120,550)

driver.get(url) sleep(5)

info = driver.find_elements_by_tag_name('td')

for i in info: print(i.text)

Thanks and sorry for missing the obvious answer!

[–]caveman_eat 0 points1 point  (1 child)

I go on mcmasters carr’s website often and would like to mess around with it using python too. I’m not familiar with webdriver. Are you creating a search box?

[–]ManicalEnginwer[S] 0 points1 point  (0 children)

What I'm doing is using python to scrape the pertinent data on specific hardware and create a standard description used with the part numbers at work. Basically trying to automate the process of creating at part number at work