How to import text from a website?
BlitzMax Forums/MaxGUI Module/How to import text from a website?
| ||
Hi there, I am working on a app to help me learn the guitar. Within my app, I would like to navigate the web with the maxgui HTML control and import some lyrics and chords while respecting the spacing between these. For some website, when I naively copy and paste from the browser to notepad, the spacing between the chords and the lyrics gets messed up. A rectangle selection over the webpage would be ideal but I would settle for importing the entire page into a textarea gadget Is this possible? I don't even know where to start. Could someone point me in the right direction? Thank you |
| ||
Hi, simple idea, but not so easy... Well, I think for lyrics (as they should be text) it's possible to 'download' the page and then 'scan' the content looking for the text (of course you NEED to know how the page is formatted - ie: a CSS style could be used as marker) This is the BlitzBasic.com page with your initial post; you can understand that the 'td class="posttext" is a marker for your text. For chords - unless they are displayed as text - I have no clue. edit: I just looked to a site (http://www.azlyrics.com/lyrics/queen/killerqueen.html). In this case the marker is a 'string' <!-- start of lyrics --> But, again, no clue about chords... |