@JonB I really like using BS4 but perhaps it is not the right tool for this particular job.

Given that the text in question is on about the 20th line of the second javascript in the webpage, is BS4 the best tool? BS4 will be great for finding the second SCRIPT block but is it helpful for parsing into that script? Perhaps using str.partition('"ip"') is more direct. Perhaps I am missing some capabilities that are in BS4.

import requests url = 'https://disneyland.disney.go.com/calendars/day/' for line in requests.get(url).text.splitlines(): _, ip_in_double_quotes, rest = line.partition('"ip"') if rest: print('Your IP is {}.'.format(rest.split('"')[1]))