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

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
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,215,558
Messages
6,125,504
Members
449,235
Latest member
Terra0013

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