-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbot.py
More file actions
34 lines (29 loc) · 1.26 KB
/
Copy pathbot.py
File metadata and controls
34 lines (29 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from jornadaRPA.webScrap import Webscrap
from botcity.web.browsers.firefox import default_options
from webdriver_manager.firefox import GeckoDriverManager
from botcity.web import *
from datetime import datetime
class Bot:
def bot(self):
# Open Browser Activity
# Displayname: OpenBrowser
webDriverPath = GeckoDriverManager().install()
webBot = WebBot()
webBot.driver_path = webDriverPath
webBot.browser = Browser.FIREFOX
webBot.headless = False
webBot.page_load_strategy = "Normal"
webBotDef_options = default_options()
webBotDef_options.add_argument("-private")
webBot.options = webBotDef_options
webBot.browse("https://jornadarpa.com.br/alunos/desafios/dataextractioncrm/desafios_crm-clientes.html")
# Extract DataTable Activity
# Displayname: ExtractDataTable
dataTable = Webscrap().webscrap(inBot=webBot, inXPATH="/html/body/div[4]/section/div/div/div/div/div/div/div/div[2]/div/table", inLines=0,inNext="/html/body/div[4]/section/div/div/div/div/div/div/div/div[3]/div[2]/div/ul/li[5]/a", inGetLink=False)
# Print Activity
# Displayname: Print
print(dataTable)
return
if __name__ == '__main__':
bot = Bot()
bot.bot()