Selenium how to press Ctrl+a Ctrl+c ?



  • hey,

    i try to build a website text scraper for multiple websites. I just need a way to save just all the text from the website... (just like open a webiste in webbrowser and copy all the text with [Ctrl+A][Ctrl+C]).

    Is this possible with openbullet Selenium ?

    thank you


  • Admin

    Have you already tried targeting the body element and do an element action GetText?



  • thanks it seems like it works...

    but now another question i want to keep only specific text from the websites which i am scraping, thats why i use the function block with the regexmatch. But the regexmatch function matches only the first pattern

    for example i scrape a proxy list website which contains this: 127.0.0.1:80, 128.0.0.2:81, 129.0.0.3:83

    the regexmatch function will only matches the first ip "127.0.0.1:80"

    how can i match everything ?

    thank you


  • Admin

    Instead of a Function block, use a Parse block and tick Recursive. Then you will also have to include your pattern inside a group e.g. .*(hello).* and output it with its number in square brackets [1]. Now you will have a List variable with all the data captured.


Log in to reply