|
@ -89,6 +89,9 @@ class fdb_spider(object): |
|
|
fdb_conf_entry_list_parent = fdb_conf_entry_list.get("parent") |
|
|
fdb_conf_entry_list_parent = fdb_conf_entry_list.get("parent") |
|
|
fdb_conf_entry_list_child_name = fdb_conf_entry_list.get("child-name") |
|
|
fdb_conf_entry_list_child_name = fdb_conf_entry_list.get("child-name") |
|
|
fdb_conf_entry_list_child_link = fdb_conf_entry_list.get("child-link") |
|
|
fdb_conf_entry_list_child_link = fdb_conf_entry_list.get("child-link") |
|
|
|
|
|
fdb_conf_entry_list_child_info = fdb_conf_entry_list.get("child-info") |
|
|
|
|
|
fdb_conf_entry_list_child_period = fdb_conf_entry_list.get("child-period") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for i in iteration_var_list: |
|
|
for i in iteration_var_list: |
|
|
print(i) |
|
|
print(i) |
|
@ -123,19 +126,33 @@ class fdb_spider(object): |
|
|
print('-----------------------------------------------------------------------------------------------------------------------------------------') |
|
|
print('-----------------------------------------------------------------------------------------------------------------------------------------') |
|
|
print(etree.tostring(tree.xpath(fdb_conf_entry_list_parent)[n]).decode()) |
|
|
print(etree.tostring(tree.xpath(fdb_conf_entry_list_parent)[n]).decode()) |
|
|
|
|
|
|
|
|
print('this is the first actual name element:') |
|
|
|
|
|
|
|
|
print('this is the name children:') |
|
|
|
|
|
|
|
|
name_element = tree.xpath(fdb_conf_entry_list_parent + fdb_conf_entry_list_child_name) |
|
|
name_element = tree.xpath(fdb_conf_entry_list_parent + fdb_conf_entry_list_child_name) |
|
|
print(name_element) |
|
|
print(name_element) |
|
|
for name in name_element: |
|
|
|
|
|
print(name) |
|
|
|
|
|
|
|
|
#for name in name_element: |
|
|
|
|
|
# print(name) |
|
|
|
|
|
print(len(name_element)) |
|
|
|
|
|
|
|
|
print('this is the first actual link element:') |
|
|
|
|
|
|
|
|
print('this is the link children:') |
|
|
|
|
|
|
|
|
link_element = tree.xpath(fdb_conf_entry_list_parent + fdb_conf_entry_list_child_link) |
|
|
link_element = tree.xpath(fdb_conf_entry_list_parent + fdb_conf_entry_list_child_link) |
|
|
print(link_element) |
|
|
print(link_element) |
|
|
#for link in link_element: |
|
|
#for link in link_element: |
|
|
# print(link) |
|
|
# print(link) |
|
|
|
|
|
print(len(link_element)) |
|
|
|
|
|
|
|
|
|
|
|
print('this is the info children:') |
|
|
|
|
|
|
|
|
|
|
|
info_element = tree.xpath(fdb_conf_entry_list_parent + fdb_conf_entry_list_child_info) |
|
|
|
|
|
print(info_element) |
|
|
|
|
|
print(len(info_element)) |
|
|
|
|
|
|
|
|
|
|
|
print('this is the period children:') |
|
|
|
|
|
|
|
|
|
|
|
period_element = tree.xpath(fdb_conf_entry_list_parent + fdb_conf_entry_list_child_period) |
|
|
|
|
|
print(period_element) |
|
|
|
|
|
print(len(period_element)) |
|
|
|
|
|
|
|
|
except Exception as e: |
|
|
except Exception as e: |
|
|
print( |
|
|
print( |
|
@ -194,6 +211,10 @@ class fdb_spider(object): |
|
|
fdb_conf_entry_list_parent = fdb_conf_entry_list.get("parent") |
|
|
fdb_conf_entry_list_parent = fdb_conf_entry_list.get("parent") |
|
|
fdb_conf_entry_list_child_name = fdb_conf_entry_list.get("child-name") |
|
|
fdb_conf_entry_list_child_name = fdb_conf_entry_list.get("child-name") |
|
|
fdb_conf_entry_list_child_link = fdb_conf_entry_list.get("child-link") |
|
|
fdb_conf_entry_list_child_link = fdb_conf_entry_list.get("child-link") |
|
|
|
|
|
fdb_conf_entry_list_child_info = fdb_conf_entry_list.get("child-info") |
|
|
|
|
|
fdb_conf_entry_list_child_period = fdb_conf_entry_list.get("child-period") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print('blabliblub') |
|
|
print('blabliblub') |
|
|
print('len', len(tree.xpath(fdb_conf_entry_list_parent))) |
|
|
print('len', len(tree.xpath(fdb_conf_entry_list_parent))) |
|
|
for n in range(len(tree.xpath(fdb_conf_entry_list_parent))): |
|
|
for n in range(len(tree.xpath(fdb_conf_entry_list_parent))): |
|
@ -202,6 +223,17 @@ class fdb_spider(object): |
|
|
fdb_conf_entry_list_parent |
|
|
fdb_conf_entry_list_parent |
|
|
+ fdb_conf_entry_list_child_name |
|
|
+ fdb_conf_entry_list_child_name |
|
|
)[n] |
|
|
)[n] |
|
|
|
|
|
|
|
|
|
|
|
info = tree.xpath( |
|
|
|
|
|
fdb_conf_entry_list_parent |
|
|
|
|
|
+ fdb_conf_entry_list_child_info |
|
|
|
|
|
)[n] |
|
|
|
|
|
|
|
|
|
|
|
period = tree.xpath( |
|
|
|
|
|
fdb_conf_entry_list_parent |
|
|
|
|
|
+ fdb_conf_entry_list_child_period |
|
|
|
|
|
)[n] |
|
|
|
|
|
|
|
|
print('oi ', name) |
|
|
print('oi ', name) |
|
|
print('blablidubbiduub') |
|
|
print('blablidubbiduub') |
|
|
link = tree.xpath( |
|
|
link = tree.xpath( |
|
@ -217,6 +249,8 @@ class fdb_spider(object): |
|
|
if len(name) > 0: |
|
|
if len(name) > 0: |
|
|
dictionary_entry_list[n] = {} |
|
|
dictionary_entry_list[n] = {} |
|
|
dictionary_entry_list[n]["name"] = name |
|
|
dictionary_entry_list[n]["name"] = name |
|
|
|
|
|
dictionary_entry_list[n]["info"] = info |
|
|
|
|
|
dictionary_entry_list[n]["period"] = period |
|
|
|
|
|
|
|
|
if fdb_domain in link: |
|
|
if fdb_domain in link: |
|
|
dictionary_entry_list[n]["link"] = link |
|
|
dictionary_entry_list[n]["link"] = link |
|
|