Skip to content

Commit

Permalink
removed get_token_local_storage
Browse files Browse the repository at this point in the history
  • Loading branch information
felixCloup committed Jun 14, 2019
1 parent 157c12b commit 6cf9164
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions screamshot/utils.py
Expand Up @@ -183,29 +183,6 @@ def get_token(url, data, local_storage=False, page=None):
return request.content


def get_token_local_storage(url, data, page):
"""
Returns the token fetched to an url
:param url: The url to visit
:type url: str
:param data: credentials data to use
:type data: dict
:param page: page used for the local storage
:type page: pyppeteer.page.Page
:retype: dict
..warning:: Raises BadAuth error if the response hasn't the status code 200
"""
token = get_token(url, data)
to_sync(page.evaluate(
"() => window.localStorage.setItem('token', '{}')".format(token)))
return token


def wait_server_start(url: str, waiting_message: str, final_message: str):
"""
Wait for a web page to answer
Expand Down

0 comments on commit 6cf9164

Please sign in to comment.