Jump to content
UBot Underground

HTML links in an e-mail


Recommended Posts

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)post-14651-0-04321400-1390936578_thumb.jpg

 

On the next page (exhibit 2.jpg)post-14651-0-98070800-1390936722_thumb.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 post-14651-0-59647300-1390937619_thumb.jpg. 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) post-14651-0-13081700-1390938225_thumb.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)post-14651-0-10501100-1390938328_thumb.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

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...