SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Nov 12, 2007, 21:00 #1
- Join Date
- Nov 2004
- Location
- Tampa, FL
- Posts
- 21
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
In Browser, want to hit a key, search loaded HTML and write info to file
hi all
am hoping someone can help me with this.
i need to only run this on my machine - so i can install any additional items that help - we don't need to worry about this running in the public domain.
i'd like to be on a webpage... lets say on an ebay item, for example. i'd like to hit some key (like to start a macro) and have a specific piece of info from that page written (appended) out to a local text file. in the ebay example, lets say i'm browsing an item (every item has an ebay auction id) and for any given item, when i hit my "macro" key, that current auction id is written to the file.
it doesn't have to be ebay, it could be a stock's info page and the id & current price get written to the file.
i have no idea how/where to start... or which technology to use. i'd like to remain in firefox. currently, i don't think i'd be on an RSS results page, so i don't think there's XML available. Again, using ebay as an example, the ITEM# exists at least 20 times inside a page's HTML for that item. certainly something can search through there and find it.
thx in advance
jaymer...
PS _ I had this posted over in WebDesign forum, but "csswiz" suggested I post it here.
-
Nov 13, 2007, 09:12 #2
- Join Date
- Nov 2004
- Location
- Tampa, FL
- Posts
- 21
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
ok, been chatting a bit and thinking.
one thing i could do is inject my own JS into any downloaded webpage. that would give me some code i can run -- let's say if i hit a right-click.
2 issues that i see:
1) since JS cannot write to local storage, how about calling a web service/cgi script somewhere and passing the data i need to save. instead of it being locally on disk, i could download that file regularly.
2) on the ebay example, there's form variables i could evaluate to get the ebay id, lets say. but what about this example:
http://tampa.craigslist.org/bab/477431388.html
on craigslist, each item has an id. its in the URL above. how would i be able to save the ID # of the page i'm looking at. There are no form vars on this page to grab. I am still going to add my own JS to trap the right-click and trigger my event. Do I have access to the URL of the page I'm currently on? If so, that URL contains the info i need. What would be nice is if I could right-click on that Craigslist page, and immed. call my cgi script on a server and be able to tell which CL page I came from.
jaymer...
-
Nov 13, 2007, 21:38 #3
- Join Date
- Nov 2004
- Location
- Tampa, FL
- Posts
- 21
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
am leaning toward
Firefox Plain Old Webserver
I can call a .sjs to save passed vars to a local file.
only problem I have now is issue # 2 above - how to pass that ID# off to the save routine.Last edited by jaymer; Nov 14, 2007 at 22:03.
Bookmarks