ImportXML to Pull URLs from Webpage

mauricem72

New Member
Joined
Mar 13, 2018
Messages
4
I have a spreadsheet that I'm using to import data from a webpage. I've been able to pull in everything from the page but I'm looking for the information in a specific node. I'm having trouble pulling it in.

Here's the info
Site: https://leagueofcomicgeeks.com/profile/mauricem72/pull-list

I'm trying to pull the URLs listed from the links on the page
Node:
<div class="comic-title"><a href="/comic/9487913/action-comics-999">Action Comics #999</a></div>
<a href="/comic/9487913/action-comics-999">Action Comics #999</a>


I can pull the title in using =importXML("https://leagueofcomicgeeks.com/profile/mauricem72/pull-list","//a/@href") but it pulls in all the URLs on the page. How do I filter it by only the ones that start with "comic"? Preferably the first entry that matches from each entry?

I tried
=importXML("https://leagueofcomicgeeks.com/profile/mauricem72/pull-list","//a/@href[comics]") and it didn't work.

Thanks!
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Noticed that the code I entered is being parsed
Site:
Code:
<a href="/comic/9487913/action-comics-999">Action Comics #999</a>
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,314
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top