scrape website chemdraw for low melting point in r

To scrape the ChemDraw website for low melting point data using R, you can use the rvest package. First, you'll need to identify the HTML element(s) that contain the data you want to scrape.

Based on a quick search, it seems that the ChemDraw website doesn't have a direct search function or database for low melting points. However, some universities or organizations may have compiled such data in a searchable format, so you may want to search for those sources instead.

Assuming you've found a website with the low melting point data you need, you can use the following R code as a starting point:

main.r
library(rvest)

# replace "website_URL" with the actual URL of the website you want to scrape
page <- read_html("website_URL")

# identify the HTML element(s) that contain the low melting point data
# replace "CSS_selector" with the actual CSS selector(s) for the element(s)
lmp_elements <- page %>% html_nodes("CSS_selector")

# extract the low melting point data from the HTML element(s)
# for example, if the data is in a table, you can use html_table()
lmp_table <- lmp_elements %>% html_table()
500 chars
13 lines

Of course, the details of the code will depend on the specific website and HTML structure you're dealing with. You may need to use different functions from the rvest package or other relevant packages to get the data you need. Additionally, remember to follow ethical and legal considerations when web-scraping, and to respect the terms of use of the website you're scraping.

gistlibby LogSnag