抓蜘蛛关闭信号

时间:2017-06-19 12:33:44

标签: python scrapy

我有三只蜘蛛。我需要运行其中两个,然后,当一个蜘蛛关闭时,最后一个应该启动。

这就是我运行蜘蛛的方式

(* make the first 2 arguments implicit *)    
Arguments make_diff [A R] _ _ _ _.

Require Import Coq.Arith.Arith.

Compute make_diff lt_dec Nat.eq_dec [1;2;3] [4;5;6].
(* = [remove nat 1; remove nat 2; remove nat 3; add nat 4; add nat 5; add nat 6] 
      : list (diff nat) *)

我已阅读有关信号的scrapy文档,但仍然无法获取,我的代码中可以捕获from ldap3 import Server, Connection, ALL, NTLM from elizabeth import Personal, Address,Text from ldap3.extend.microsoft.addMembersToGroups import ad_add_members_to_groups as addUsersInGroups import random serverName='dc1.stand.local' connUser="stand.lsd\\Admin" connUserPwd="" usersOU = 'ou=test-ou,dc=stand,dc=local' groupsOU = 'ou=test-groups,dc=stand,dc=local' usersDnList = [] groupsDnList = [] server = Server(serverName, get_info=ALL) conn = Connection(server, user=connUser, password=connUserPwd, authentication=NTLM) conn.bind() #must be TRUE conn.add(usersOU, 'organizationalUnit') # add test-ou for users conn.add(groupsOU, 'organizationalUnit') # add test-ou for groups data = Text('en') for _ in range(0,10): currentGroup = 'cn='+data.word()+',ou=test-groups,dc=stand,dc=local' groupsDnList.append(currentGroup) conn.add(currentGroup, 'group') address = Address('en') person = Personal('en') for _ in range(0,10): address_country = address.country() conn.add('ou='+address_country+',ou=test-ou,dc=stand,dc=local', 'organizationalUnit') for _ in range (0,10): name = person.name(gender='male') surname = person.surname(gender='male') currentUser = 'cn='+name+'.'+surname+','+'ou='+address_country+',ou=test-ou,dc=stand,dc=local' usersDnList.append(currentUser) conn.add(currentUser, 'User', {'givenName': name, 'sn': surname, 'departmentNumber': 'DEV', 'telephoneNumber': 1111}) for _ in range(0,300): rndUser = random.choice(usersDnList) rndGroup = random.choice(groupsDnList) addUsersInGroups(conn, rndUser, rndGroup) 吗?

0 个答案:

没有答案