Skip to content

Commit

Permalink
add open str
Browse files Browse the repository at this point in the history
  • Loading branch information
testerSunshine committed Dec 18, 2019
1 parent 7c9ad86 commit 88a1941
Show file tree
Hide file tree
Showing 3 changed files with 396 additions and 398 deletions.
20 changes: 10 additions & 10 deletions UnitTest/TestAll.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

import requests

import TickerConfig
from agency.agency_tools import proxy
from agency.cdn_utils import CDNProxy
from config.emailConf import sendEmail
from config.serverchanConf import sendServerChan
from init.select_ticket_info import select
from inter.LiftTicketInit import liftTicketInit


def _set_header_default():
Expand All @@ -25,7 +25,6 @@ def _set_header_default():


class testAll(unittest.TestCase):

def testProxy(self):
"""
测试代理是否可用
Expand Down Expand Up @@ -105,14 +104,15 @@ def testCdn(self):
测试cdn筛选
:return:
"""
CDN = CDNProxy()
all_cdn = CDN.open_cdn_file()
cdn = ["60.9.0.19", "60.9.0.20", "113.16.212.251", "36.250.248.27"]
from inter.LiftTicketInit import liftTicketInit
from init.select_ticket_info import select
from config.getCookie import getDrvicesID

s = select()
all_cdn = self.open_cdn_file()
cdns = [all_cdn[i:i + 50] for i in range(0, len(all_cdn), 50)]
for i in cdns:
t = threading.Thread(target=s.cdn_req, args=(i,))
t.start()
s.httpClint.cdn = cdn[3]
getDrvicesID(s)
liftTicketInit(s).reqLiftTicketInit()


if __name__ == '__main__':
Expand Down
Loading

0 comments on commit 88a1941

Please sign in to comment.