Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
leriou committed Mar 25, 2018
1 parent baa224c commit 0f28f3b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@

`pipenv run python3 fzdm_main.py 进击的巨人` 抓取进击的巨人动画的数据


`pipenv run python3 main.py 2018-01-07`
15 changes: 8 additions & 7 deletions zgzcw.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import di
import tools
import time
import sys
import asyncio
import sys,os
from multiprocessing import Pool

class Builder:

def __init__(self):
self.tools = tools.Tools()
self.di = di.Di()
self.mongodb = self.di.getMongoDb()

self.list_url = "http://cp.zgzcw.com/lottery/jchtplayvsForJsp.action?lotteryId=47&type=jcmini"
self.bjop_url = "http://fenxi.zgzcw.com/"

Expand All @@ -35,7 +34,7 @@ def get_list(self,date = None,limit = 320):
if date != None:
self.get_list_by_date(date)
else:
now = time.time() - (3600 * 24 * 320) #
now = time.time() - (3600 * 24 * 223) #
loop = True
while loop:
date = time.strftime("%Y-%m-%d",time.localtime(now))
Expand All @@ -47,18 +46,20 @@ def get_list(self,date = None,limit = 320):

def get_list_by_date(self,date):
self.tools.logging("INFO","------"+ date + "------")
match_list = self.analysis_list(self.get_module_url("list",date))
url = self.get_module_url("list",date)
match_list = self.analysis_list(url)
if match_list:
self.mongodb["zgzcw"]["matches"].insert(match_list)
self.tools.cost("处理%s数据%s条" % (date,len(match_list)))
self.tools.mongo_clear_cache()



def analysis_list(self,url):
match_list = []
# if self.tools.check_url_success(url):
# return False
dom = self.tools.get_dom_obj(url)
for tr in dom.select(".endBet") + dom.select(".beginBet"):
for tr in dom.select(".endBet") + dom.select(".beginBet"):
bjop = self.get_bjop(tr.select(".wh-10")[0].get("newplayid"))
if bjop:
odds = {}
Expand Down

0 comments on commit 0f28f3b

Please sign in to comment.