I'm trying to extract inline javascript that is uniquely different on thousands of URLs, and is nested within the code at various levels.
As I familiarize myself with XPATH syntax I am trying to see if anyone knows a good way to target javascript For example:
<script type="text/javascript"> ...data_#...</script>
<script type="text/javascript"> ...data_#...</script>
<script type="text/javascript"> ...data_n...</script>
<script type="text/javascript"> ...data_#...</script>
<script type="text/javascript"> ...data_#...</script>
The only unique identfier within the <script>...data_n...</script>
that I am attempting to extract is it contains:
var tabsRelated = ...
Within the confines of XPATH does anyone know a way to find the script that contains that variable and target the entire script? Sorta like:
//script[inner.text contains='var tabsRelated'
syntax is not proper