Issue
I've been attempting to web scape some detail from the following website, but I'm unable to figure out how to access the class, id, and class type for the following object below.
https://mor.nlm.nih.gov/RxClass/search?query=H%7CATC1-4&searchBy=class&sourceIds=&drugSources=atc1-4%7Catc%2Cepc%7Cfdaspl%2Cmeshpa%7Cmesh%2Cdisease%7Cndfrt%2Cchem%7Cfdaspl%2Cmoa%7Cfdaspl%2Cpe%7Cfdaspl%2Cpk%7Cndfrt%2Cva%7Cndfrt%2Cdispos%7Csnomedct%2Cstruct%7Csnomedct
On the following website with the search condition you'll see in the center of the screen it
class: SYSTEMIC HORMONAL PREPARATIONS, EXCL. SEX HORMONES AND INSULINS / id: H / class type: ATC1-4 / show context
I'd like to make the assumption that the above is in bold is a CSS_Selector, but I can't seem to locate it.
Any guidance on how to locate the class, element, or css_selector would be much appreciated.
Solution
You can use the developer console in Firefox or any Chromium-based browser: open the contextmenu on the element you want and select Inspect
. Then the developer console should open. The current element should be focused in the DOM tree. There you should have the option Copy > CSS selector
. And you're done. In your current case the path is something like this:
html body div.container-fluid div.col-sm-9.col-sm-offset-3.col-md-9.col-md-offset-3.main div#tabContent.tab-content div#drugMemberPane.tab-pane.active div#drugMemberPage.table-responsive div.propText strong
Answered By - Gregor
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.