Skip to content

Commit

Permalink
Added pure urllib version without browser.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Paul TACHER authored and Pierre-Paul TACHER committed Apr 5, 2022
1 parent 443623c commit bf4bd98
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions paris.fr/python_request_nb.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ def processing_flush(n, index=10):
with open(filename, mode="wb") as file:
file.write(p.read())


command = f'''
open {filename}
'''
Expand Down Expand Up @@ -240,10 +241,7 @@ def processing_flush(n, index=10):
html = response.read().decode('utf-8')
parsed_html = BeautifulSoup(html,features="lxml")

command = f'''
rm {filename}
'''
os.system(command)
os.remove(filename)

if dict.get('view') == ['getAppointmentCreated']:
break
Expand Down

0 comments on commit bf4bd98

Please sign in to comment.