Help with script - substring needed

If you need help on how to use the program
Post Reply
rs232
Posts: 107
Joined: 2012-05-09 21:57:22

Help with script - substring needed

Post by rs232 »

I have been using a script to generate .NFO for long time now.

Basically it saved the full IMDB url in the URL field.

I now moved from Plex to Emby (about time) and emby required the .nfo to contain something like this:

Code: Select all

<imdbid>ttxxxxxxx</imdbid>
Considering I can get the full URL easily with this:

Code: Select all

      FormatedData := FormatedData +'   <imdbid>'+GetField(fieldUrl)+'</imdbid>'+#13#10;
Which gives me this:

Code: Select all

<imdbid>https://www.imdb.com/title/tt0085400</imdbid>
How would I go extracting the tt0085400 reference only instead than the full URL?

The sources can be either called e.g.:

https://www.imdb.com/title/tt0085400/?ref_=fn_al_tt_2

or

https://www.imdb.com/title/tt0085400

(two type of URL format are saved as far as I can tell)


Thanks!!!
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Help with script - substring needed

Post by antp »

Check the bottom of the IMDb script: it does that in case the movie URL is provided
Post Reply