55
66time_start = time .time ()
77
8- regex = re .compile (r"img\s+src=([^\s ]+)\s+alt=([^\/ ]+)" )
8+ regex = re .compile (r"img\s+src=\" ([^\" ]+)\"\ s+alt=\" ([^\" ]+)" )
99regex2 = re .compile (r"span\s+class=\"gray12\">([^<]+)" )
10- regex3 = re .compile (r"a\s+href=[^\s ]+\s+target=[^\s ]+\s+title=[^\s ]+\s+class=[^>] +>([^<]+)" )
11- regex4 = re .compile (r"<li>([^<]+)" )
12- regex5 = re .compile (r"a\s+target=[^s ]+\s+title=[^\s]+\ s+href=([^> ]+)>([^<]+) " )
10+ regex3 = re .compile (r"a\s+href=\" [^\" ]+\"\ s+target=\" [^\" ]+\"\ s+title=\" [^\" ]+\"\ s+class=\"[^\"]\"\s +>([^<]+)" )
11+ regex4 = re .compile (r"<li>([^<\+ ]+)" )
12+ regex5 = re .compile (r"a\s+target=\'[^\' ]+\'\ s+title=\"([^(\")]+)\"\ s+href=\" ([^\" ]+)\"s*> " )
1313regex6 = re .compile (r"^\/([^\/]+/)" )
1414regex7 = re .compile (r"\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}" )
1515
16+ #regex = re.compile(r"img\s+src=([^\s]+)\s+alt=([^\/]+)")
17+ #regex2 = re.compile(r"span\s+class=\"gray12\">([^<]+)")
18+ #regex3 = re.compile(r"a\s+href=[^\s]+\s+target=[^\s]+\s+title=[^\s]+\s+class=[^>]+>([^<]+)")
19+ #regex4 = re.compile(r"<li>([^<]+)")
20+ #regex5 = re.compile(r"a\s+target=[^s]+\s+title=[^\s]+\s+href=([^>]+)>([^<]+)")
21+ #regex6 = re.compile(r"^\/([^\/]+/)")
22+ #regex7 = re.compile(r"\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}")
23+
1624conf = ConfigParser .ConfigParser ()
1725conf .read ("conf_comic" )
1826section = "dmzj"
@@ -47,7 +55,7 @@ def run(self):
4755
4856 #封面图片地址,漫画名
4957 for x in regex .findall (content ):
50- self .data .append ([x [0 ]. replace ( " \" " , "" ), x [1 ]. replace ( " \" " , "" ) , "2" , "3" , "4" , "5" , "6" , "7" , "8" ])
58+ self .data .append ([x [0 ], x [1 ], "2" , "3" , "4" , "5" , "6" , "7" , "8" ])
5159
5260 self .maxsize = len (self .data )
5361
@@ -64,9 +72,9 @@ def run(self):
6472 elif (i == 4 ):
6573 self .data [p ][4 ] = x
6674 p += 1
67- elif (i % 3 == 1 ):
68- self .data [p ][3 ] = x
6975 elif (i % 3 == 2 ):
76+ self .data [p ][3 ] = x
77+ elif (i % 3 == 1 ):
7078 self .data [p ][4 ] = x
7179 p += 1
7280
@@ -75,17 +83,18 @@ def run(self):
7583
7684 #更新卷
7785 for i , x in enumerate (regex5 .findall (content )):
78- self .data [i ][5 ] = cfgDmjz ["root" ] + x [0 ]. replace ( " \" " , "" )
79- self .data [i ][6 ] = x [1 ]
80- self .data [i ][7 ] = cfgDmjz ["root" ] + "/" + regex6 .findall (x [0 ]. replace ( " \" " , "" ) )[0 ]
86+ self .data [i ][5 ] = cfgDmjz ["root" ] + x [1 ]
87+ self .data [i ][6 ] = x [0 ]
88+ self .data [i ][7 ] = cfgDmjz ["root" ] + "/" + regex6 .findall (x [1 ] )[0 ]
8189
8290
8391 #更新时间
8492 for i , x in enumerate (regex7 .findall (content )):
8593 self .data [i ][8 ] = x
8694
8795 except Exception , e :
88- pass
96+ #pass
97+ print e
8998
9099thread_pool = []
91100for i , x in enumerate (update_list ):
0 commit comments