Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Beginner Help!
#1
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.
Reply
#2
you should start here:
web scraping part 1
web scraping part 2
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020