mirror of
https://github.com/soimort/you-get.git
synced 2025-02-03 08:43:58 +03:00
parent
6c87cbde10
commit
96398d8f6c
@ -257,7 +257,6 @@ def undeflate(data):
|
||||
# DEPRECATED in favor of get_content()
|
||||
def get_response(url, faker = False):
|
||||
logging.debug('get_response: %s' % url)
|
||||
url = parse.quote(url, ':/')
|
||||
|
||||
# install cookies
|
||||
if cookies:
|
||||
@ -280,7 +279,6 @@ def get_response(url, faker = False):
|
||||
# DEPRECATED in favor of get_content()
|
||||
def get_html(url, encoding = None, faker = False):
|
||||
logging.debug('get_html: %s' % url)
|
||||
url = parse.quote(url, ':/')
|
||||
|
||||
content = get_response(url, faker).data
|
||||
return str(content, 'utf-8', 'ignore')
|
||||
@ -288,7 +286,6 @@ def get_html(url, encoding = None, faker = False):
|
||||
# DEPRECATED in favor of get_content()
|
||||
def get_decoded_html(url, faker = False):
|
||||
logging.debug('get_decoded_html: %s' % url)
|
||||
url = parse.quote(url, ':/')
|
||||
|
||||
response = get_response(url, faker)
|
||||
data = response.data
|
||||
@ -300,7 +297,6 @@ def get_decoded_html(url, faker = False):
|
||||
|
||||
def get_location(url):
|
||||
logging.debug('get_location: %s' % url)
|
||||
url = parse.quote(url, ':/')
|
||||
|
||||
response = request.urlopen(url)
|
||||
# urllib will follow redirections and it's too much code to tell urllib
|
||||
@ -327,7 +323,6 @@ def get_content(url, headers={}, decoded=True):
|
||||
"""
|
||||
|
||||
logging.debug('get_content: %s' % url)
|
||||
url = parse.quote(url, ':/')
|
||||
|
||||
req = request.Request(url, headers=headers)
|
||||
if cookies:
|
||||
@ -367,7 +362,6 @@ def post_content(url, headers={}, post_data={}, decoded=True):
|
||||
"""
|
||||
|
||||
logging.debug('post_content: %s \n post_data: %s' % (url, post_data))
|
||||
url = parse.quote(url, ':/')
|
||||
|
||||
req = request.Request(url, headers=headers)
|
||||
if cookies:
|
||||
|
Loading…
Reference in New Issue
Block a user