Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to search for specific text from a website, retrieve and use it with google app engine (python)?

I'm trying to retrieve basically this block of text from www.crossfit.com.


Monday 110516

Complete as many rounds as possible in five minutes of:

275 pound Deadlift, 3 reps

115 pound Push press, 7 reps


It's basically just the date (Monday yymmdd), and a short description of a workout. The site updates daily with a new workout. I want to write a google app using the python version that will pull the daily workout automatically. Where should I start? I followed along google's helloworld example and that's about as much as I know about html, python, and google apps.

like image 897
1stsage Avatar asked Nov 24 '25 19:11

1stsage


1 Answers

Instead of parsing the HTML yourself, use the already provided XML feed: http://www.crossfit.com/index.xml.

You can parse the XML feed in python 2.5 with xml.etree.ElementTree.

like image 170
Gregg Avatar answered Nov 26 '25 11:11

Gregg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!