erikyuki 0 Posted January 28, 2014 Report Share Posted January 28, 2014 Hello, everyone, I´m new to UBot and there´s a task I´ve found no way of getting around... any help would be greatly appreciated. Let me first explain what this bot has to do: Every day, a number of public companies may publish a document called CVM 358 to a public database. There is a number of steps to reach the page, but, in the end, it all comes to this: http://siteempresas.bovespa.com.br/consbov/InfoPerEventuaisBuscData.asp?site=C&ccvm=&razao=&acao=undefined Date of reference is jan 17th 2014.I can get the bot to choose the right parameters (Periodo da Consulta = "No dia", Categoria = "Valores Mobiliarios negociados e detidos (art. 11 da Inscr. CVM no 358)", Tipo = "Todos os tipos") and click the Search ("Buscar") button (exhibit 1.jpg) On the next page (exhibit 2.jpg), we can find the three companies that have published new information on that day. If we check the source code, though, we´ll find that those three links aren´t common html links. Instead, they bring up a java script that replaces part of the companies´ names and internal codes in a newly formed URL. This is where things start getting tricky: We´ll notice that the site does not follow a standard to write the companies´ names (for example, SA, S.A. and S/A are all used on the same page). I´ve found a way of getting around that by creating a table with the companies´ names and searching for them on another page (exhibit 3.jpg): http://cvmweb.cvm.gov.br/SWB/Sistemas/SCW/CPublica/CiaAb/FormBuscaCiaAb.aspx?TipoConsult=c . Clicking on the Continue ("Continuar") button is easy enough. The problem is that, sometimes, the names of the companies are not recorded correctly, so I´ve programmed UBot to remove the last 4 characters in every company name it types in that field. The next page brings up a menu with a number of different information we can view (exhibit 4.jpg) and we effortlessly click on "Valores Mobiliários negociados e detidos (art. 11 da Instr. CVM nº 358)" with UBot. Now comes the page I´ve been stuck in for the last three weeks (exhibit 5.jpg). I need the bot to scrape the Download link for the first item in the table and compose an e-mail with the name of the company and the Download link (or a table with the names and links, should more than one company release information on any one day). My question is: Is it possible to get that Download link and use it to compose an automated e-mail? I´m sorry to write so much on my very first post, but I really am lost here. Any help would be greatly appreciated. Thanks a lot, Erik Quote Link to post Share on other sites
a2mateit 395 Posted January 30, 2014 Report Share Posted January 30, 2014 Without knowing the site in question, it is virtually impossible to help you out... Quote Link to post Share on other sites
vonnch 1 Posted February 1, 2014 Report Share Posted February 1, 2014 Hi Erik, you might want to post the site that your trying to work with here. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.