IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Add a [PreIndexUrl] function
stevehero
post Jul 16 2017, 23:21
Post #1


Member


Group: Full Members
Posts: 830
Joined: 3-December 10
From: Ireland
Member No.: 13334
Mp3tag Version: 2.84



Hi Florian,

I was hoping to see if a new web source fn could be added.

I want to parse this webpage https://www.traxsource.com/search/artists?term=solomun and get the first artist from that search result (mainly to get the artist number and use that info) therefore creating info for the [IndexUrl]=

So the code could look something like this:

This sets up the [PreIndexUrl] =
CODE
[PreIndexUrl]=https://www.traxsource.com/search/artists?term=%s


From that URL you can parse and create the new URL to be used for [IndexUrl]=
CODE
say "https://www.traxsource.com/artist/"
findline "<a href=\"/artist/"
findinline "<a href=\"/artist/"
sayuntil "/"
say "?cn=titles&ipp=100&ob=r_date&so=desc"

The above would create the URL:
CODE
https://www.traxsource.com/artist/6185/?cn=titles&ipp=100&ob=r_date&so=desc


Then use that parsed info [PreIndexUrl] = if applicable:
CODE
[IndexUrl] = PreIndexUrl


The reason for this is with the Traxsource website it's impossible to search releases based on the artist.

The code snippet/section altogether
CODE
[PreIndexUrl]=https://www.traxsource.com/search/artists?term=%s
say "https://www.traxsource.com/artist/"
findline "<a href=\"/artist/"
findinline "<a href=\"/artist/"
sayuntil "/"
say "?cn=titles&ipp=100&ob=r_date&so=desc"
[IndexUrl] = PreIndexUrl


--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th October 2017 - 08:46