zhaoyang 2 лет назад
Родитель
Сommit
1f9d70b210
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      content_spider/spiders/baichuanzw/baichuanzw.py

+ 4 - 4
content_spider/spiders/baichuanzw/baichuanzw.py

@@ -65,7 +65,7 @@ class baichuanzw(object):
     source_id = source_id
     source_id = source_id
 
 
     def get_start_url(self):
     def get_start_url(self):
-        sign = md5('{}{}'.format(self.client_id, self.key))
+        sign = md5('{}{}'.format(client_id, key))
         return base_url.format('getBookList', sign)
         return base_url.format('getBookList', sign)
 
 
     def bid_list_result(self, response):
     def bid_list_result(self, response):
@@ -78,7 +78,7 @@ class baichuanzw(object):
         return result_list
         return result_list
 
 
     def get_book_info_url(self, bid):
     def get_book_info_url(self, bid):
-        sign = md5('{}{}{}'.format(self.client_id, self.key, bid))
+        sign = md5('{}{}{}'.format(client_id, key, bid))
         return base_url.format('getBookInfo', sign) + '&book_id={}'.format(bid)
         return base_url.format('getBookInfo', sign) + '&book_id={}'.format(bid)
 
 
     def book_info_result(self, response):
     def book_info_result(self, response):
@@ -94,7 +94,7 @@ class baichuanzw(object):
         }
         }
 
 
     def get_chapter_list_url(self, bid):
     def get_chapter_list_url(self, bid):
-        sign = md5('{}{}{}'.format(self.client_id, self.key, bid))
+        sign = md5('{}{}{}'.format(client_id, key, bid))
         return base_url.format('getVolumeList', sign) + '&book_id={}'.format(bid)
         return base_url.format('getVolumeList', sign) + '&book_id={}'.format(bid)
 
 
     def chapter_list_result(self, response):
     def chapter_list_result(self, response):
@@ -115,7 +115,7 @@ class baichuanzw(object):
         return result_list
         return result_list
 
 
     def get_chapter_content_url(self, bid, cid):
     def get_chapter_content_url(self, bid, cid):
-        sign = md5('{}{}{}{}'.format(self.client_id, self.key, bid, cid))
+        sign = md5('{}{}{}{}'.format(client_id, key, bid, cid))
         return base_url.format('Chapterinfo', sign) + '&book_id={}&chapter_id={}'.format(bid, cid)
         return base_url.format('Chapterinfo', sign) + '&book_id={}&chapter_id={}'.format(bid, cid)
 
 
     def chapter_content_result(self, response):
     def chapter_content_result(self, response):