Jump to content

Recent Status Updates

  • Photo
      30 Sep

    laptop hard disk seated beneath motherboard but with no access panel. 7 hours to replace :(

    Show comments (3)
  • Photo
      19 Sep

    I love it when you go to write a help thread, then while writing, you reach an enlightenment, and figure it out yourself.

    Show comments (3)
View All Updates

Developed by Kemal Taskin
- - - - -

Web scraping to get stock info

  • Please log in to reply
3 replies to this topic

#1 ahdrage


    CC Lurker

  • Just Joined
  • Pip
  • 6 posts

Posted 26 September 2009 - 10:17 AM

Im trying to get a better overview of my portfolio. So im trying to make a script to make it happen.

The script should take the ticker info from this website: http ://bors.e24.no/e24.no/site/stock/stock_detail.page?magic=(cc%20(detail%20(tsid%2053786))) (example stock)
Once I retrieve the information I want to use it on my homepage to automaticly calculate what my portfolio is worth.

Could anyone point me in the right direction of what I need to do?
  • 0

#2 TkTech


    The Crazy One

  • Retired Mod
  • PipPipPipPipPipPipPip
  • 1,144 posts
  • Location:Ottawa, Ontario

Posted 26 September 2009 - 08:37 PM

You could always post a job in the freelancer section, and someone could write the program for you.

Otherwise, the easiest way would be to go with PHP and use regex to parse what you needed from the page.
  • 0
Helpful CODECALL Links: Join Us, Guidelines, FAQ, Post a Tutorial

#3 BlaineSch


    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1,559 posts

Posted 27 September 2009 - 07:12 AM

Yea just grab the page (ton of functions to do this) then use some regular expressions to get the information you needed from this, i'd probably try and find a rss feed that makes it a ton easier to use this information.
  • 0

#4 debtboy


    CC Devotee

  • Just Joined
  • PipPipPipPipPipPip
  • 499 posts

Posted 27 September 2009 - 11:15 AM

I would use wget or Lynx,
but you could also use curl, file_get_contents or fopen
depends on your environment and what you know.

Good Luck :)
  • 0