Skip to content

Commit

Permalink
统一private方法前缀
Browse files Browse the repository at this point in the history
  • Loading branch information
huanghyw committed Dec 22, 2020
1 parent 47989be commit 1835c6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jd_spider_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def __init__(self):
self.cookies_dir_path = "./cookies/"
self.user_agent = global_config.getRaw('config', 'DEFAULT_USER_AGENT')

self.session = self.__init_session()
self.session = self._init_session()

def __init_session(self):
def _init_session(self):
session = requests.session()
session.headers = self.get_headers()
return session
Expand Down

0 comments on commit 1835c6a

Please sign in to comment.