Jump to content




Recent Topics

Recent Status Updates

  • Photo
      15 Nov
    duzamucha

    Hi, I am final year Interior Design Student from University of Huddersfield. I am currently working on my final major project which is going to be linked to coding. I was hoping that you could help me with my research. I have prepared a short survey, it would be a massive help if you could fill it in for me. It takes less than 2 minutes to complete, I promise. Here is the link: https://www.surveymonkey.com/s/73XLJKK Thank you so much in advance!

View All Updates

Developed by TechBiz Xccelerator
Photo
- - - - -

Web scraping to get stock info


  • Please log in to reply
3 replies to this topic

#1 ahdrage

ahdrage

    CC Lurker

  • Just Joined
  • Pip
  • 6 posts

Posted 26 September 2009 - 10:17 AM

Hi!
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

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

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

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




Powered by binpress