Skip to content

Commit

Permalink
show version number from api url
Browse files Browse the repository at this point in the history
  • Loading branch information
mahtin committed Mar 1, 2022
1 parent 9be2aef commit 24d0991
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CloudFlare/api_decode_from_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ def api_decode_from_web(content):

soup = BeautifulSoup(content, 'html.parser')

for child in soup.find_all('p'):
t = child.get_text()
if 'Last modified' in t:
sys.stderr.write("Retrieved API: %s\n" % (t.strip().replace('\n', ' ')))
break

all_cmds = []
for section in soup.find_all('section'):
all_cmds += do_section(section)
Expand Down

0 comments on commit 24d0991

Please sign in to comment.