Gmp.get_tasks() shows only 10 Elements

gmp.get_tasks() shows only 10 Elements … Is there a way to get the task greater then 10?

from gvmtools.helper import Table
response_xml = gmp.get_tasks()
print(response_xml.xpath(‘task’))

[<Element task at 0x7f0cf3d9ddc0>, <Element task at 0x7f0cf3d9dd00>, <Element task at 0x7f0cf3d9d940>, <Element task at 0x7f0cf3d9dbc0>, <Element task at 0x7f0cf3d9d400>, <Element task at 0x7f0cf3d9da80>, <Element task at 0x7f0cf3d9d480>, <Element task at 0x7f0cf3d9db40>, <Element task at 0x7f0cf3d9dec0>, <Element task at 0x7f0cf3d9df40>]

You just need to set a filter:
gmp.get_tasks(filter="rows=42")

Btw. you can import the pretty_print function with
from gvm.xml import pretty_print
This function prints indented xml …

2 Likes

thank you very much … wher do I find this information? :slight_smile:

E.g. here

2 Likes