Skip to content

Instantly share code, notes, and snippets.

@richardsprague
Last active May 22, 2020 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richardsprague/16802b72876f4da921b678f74d9c78bd to your computer and use it in GitHub Desktop.
Save richardsprague/16802b72876f4da921b678f74d9c78bd to your computer and use it in GitHub Desktop.
How to screen-scrape a Psomagen GutBiome+ report

How to screen-scrape a Psomagen GutBiome+ report

at URL:

https://biomereport.psomagen.com/bdcrpt/rpt/td/microbeProfile.php

Buried deep within the html <body>, somewhere under the tag <div class=“container clearfix”> and under class right-container is a line that begins with

<table class="tb tb-list green st1-1”>

Or if you know how to find it with Javascript:

document.querySelector("body > div > div > div.right-container > div > div:nth-child(8) > div.item-box.st2.clearfix > div > div.tb-wrap.st1-1 > table")

From within Chrome’s developer tools “Inspect Elements”, I right-click that line to copy element and then paste all that text into

https://www.convertcsv.com/html-table-to-csv.htm

Convert the HTML table into CSV and then copy/paste it to Excel to do with what you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment