Capturing a csv download as an array load instead using Google Script - javascript

I've spent a few days searching around the site looking for what I was after, but unable to find exactly what I'm looking for.
Basically, I want to be able to call this URL, and instead of it starting a CSV download, I want to capture the output using google script to populate a google spreadsheet:
http://www.footytips.com.au/cfm/ft/sub/downloadLadder.cfm?sort=2&fg=competitions&ff=default&sportId=2&page=1&competitionId=220363&gameType=tips&gameCompId=46295&view=ladderScores&round=1
Basically, I'm not quite sure where to start. I wasn't able to debug the javascript in-browser effectively to find if a direct path to the CSV is produced at any time.
Any help would be appreciated!
Cheers.

May be you could use google's fusion tables:
https://support.google.com/fusiontables/answer/171181?hl=en
https://developers.google.com/fusiontables/docs/v1/reference/table/importRows

Related

Read Google App Script Files from another script

I am looking to create a little Google App Script to parse another GAS file to pull out the functions and any jsdoc type comments, and then display it.
Like if you navigate to a script you can get the revision history etc, but I wanted to be able to pass in a Drive folder containing multiple script files and develop a front end to display each's content.
I know about the Google Drive REST API with exportLinks do download as JSON.
I wondered if there was a simpler way to do it from another GAS file, or would I need to URLFetch of some description to do it over the RestAPI?
I have tried searching for similar things but they always lead back to the DriveAPI.
Any help with a starting place, or what GAS Objects I should start looking at?
Thank you
You have to use the REST based Drive API, there is really no other alternative. However, you don't need to use URLFetch to access it. Google Apps Script has what's known as Advance Google Services a collection of interfaces that grant native access to many REST based APIS including the Drive API.
You can check out the Drive specific documentation here. Its somewhat sparse, so you'll often have to fall back on the REST based documentation as well as rely on autocomplete inside the script editor to make sense of things.

read text file and save the content in an array using JavaScript

I've searched a lot about this topic, but couldn't find solution. I have a *.txt file containing coordinates (each line has one coordinate) in one column. So, I want to read this file from my file system and use those coordinates to visualize the tracking route on Google Maps API v3. I've already visualized the track for three coordinates and it works fine.
Can anybody just share a sample code of reading a *.txt file and fill an array with the file content? Maybe this is quite easy thing, but I am really stuck on this and would appreciate your help!
Thanks in advance!
You can't read a file using javascript. It's a client-side programming language. But some developpers have developped a solution.
Check this link and tell me if it was helpful for you: http://www.htmlgoodies.com/beyond/javascript/read-text-files-using-the-javascript-filereader.html#fbid=iTAoMveIKhq
I'm not going to share a sample code but you could read the answers to that similar question :
Javascript - read local text file
Basically loading the txt file with Ajax, and read the responseTextattribute of the response.
Although it would be easier to read a xml file or a json file, which would be easier to parse than a simple txt file.

saving an image in a windows 8 application using javascript

I'm writing an application for windows 8 that displays images from a json file.
i would like to add the ability to save the images to my local machine but i dont know where to start.
so im just asking for advice and where to look to find out how to do this, id like to make it clear that im not asking people for code but just for some guidance on how i could find out how to go about this.
thank you in advance
EDIT:
i found a way of doing it in after a bit more looking around, I found i was able to do a ajax call on the image i was trying to save and have it return a Blob this was then written to a file
i found a way of doing it in after a bit more looking around, I found i was able to do a ajax call on the image i was trying to save and have it return a Blob this was then written to a file

Google Maps V2 epoly2 by Mike How to get states xml

I am curious about http://econym.org.uk/gmap/states.xml
how did he generate the states i would like to generate it for Canada... but cant figure out where on google he found that xml or how he generated it.. any ideas?
Hard to say, but there are various Creative Commons and ODC sources for data like this, such as those on libremap.
I don't have the time to google around for Canadian data, but I'm sure it's out there.
You can find gml files here which are actual xml files.
http://www.geobase.ca/geobase/en/search.do?produit=cgn&decoupage=province&language=en

Screen scrape a web page that uses javaScript and frames

I want to scrape data from www.marktplaats.nl . I want to analyze the scraped description, price, date and views in Excel/Access.
I tried to scrape data with Ruby (nokogiri, scrapi) but nothing worked. (on other sites it worked well) The main problem is that for example selectorgadget and the add-on firebug (Firefox) don’t find any css I can use to scrape the page. On other sites I can extract the css with selectorgadget or firebug and use it with nokogiri or scrapi.
Due to lack of experience it is difficult to identify the problem and therefore searching for a solution isn’t easy.
Can you tell me where to start solving this problem and where I maybe can find more info about a similar scraping process?
Thanks in advance!
I used excel web query and it works perfect. You can find a lot about scraping with excel on youtube if you search for mrexcel.
Thanks, Mello
You can try IRobotSoft web scraper. It has good frame support and is free.
Iframes aren't a problem - just access the embedded iframe URL directly. You will find that it redirects in the browser unless you disable JavaScript.
Description and date can be extracted straight from HTML source. However prices are images which will make scraping them more cumbersome.

Categories