简体   繁体   中英

transferring real time data from a website in python

I am programming in Python . I would like to extract real time data from a webpage without refreshing it : http://www.fxstreet.com/rates-charts/currency-rates/

I think the real time data webpage is written in AJAX but I am not quite sure.. I thought about opening an internet browser with the program but I do not really know/like this way... Is there an other way to do it?

I would like to fill a dictionnary in my program (or even a SQL database) with the latest numbers each second. please help me in python, thanks!

To get the data, you'll need to look through the javascript and HTML source to find what URL it's hitting to get the data it's displaying. Then, you can call that URL with urllib or your favorite python library and parse it

Also, it may be easier if you use a plugin like Firebug that lets you watch the AJAX requests.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM