Python Forum

Full Version: Beginner Help!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

Just starting off dabbling with python, so apologies for beginner question.

I have a simple query need to scrape web pages and return text.

Basically, I have a few hundred hyperlinks whereby i need to access that site, and have it return something that is embedded on that page.

For example, in a series links:
http://location1.htm
http://location2.htm... etc.

I need to go to page, search for a field that includes the test "ThisIsTheLineNeeded", and have it return the entire line to a file. and then loop this for all the links.
sample (i.e., the data element that contains the value i want to search),...and add the entire line below to the file:
<td scope="row"><a href="/Archives/source/data/12345/ThisIsTheLineNeeded.xml">ThisIsTheLineNeeded</a></td>

Does that make sense? Is this a pretty simple script i can run/loop thru?
Thanks for any help or guidance/direction one can offer.