IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Web Sources if findline doesn't find anything, is there a way to allow the script to continue running
pints1ze
post Nov 3 2017, 20:04
Post #1


Member


Group: Members
Posts: 2
Joined: 3-November 17
Member No.: 24127
Mp3tag Version: 2.84a



I'm writing a web source script, but in some cases the page I'm searching doesn't contain the data I'm looking for. When this happens the script fails and none of the other pieces of data populate, even though they ARE on the page I'm scraping.

If looked at If, IfNot, IfOutput, IfNotOutput, but they don't seem to fit my use.

Is there a way around this problem?
Go to the top of the page
 
+Quote Post
Fatduckz
post Jan 11 2018, 02:15
Post #2


Member


Group: Members
Posts: 1
Joined: 11-January 18
Member No.: 24358
Mp3tag Version: 2.81



QUOTE (pints1ze @ Nov 4 2017, 05:04) *
I'm writing a web source script, but in some cases the page I'm searching doesn't contain the data I'm looking for. When this happens the script fails and none of the other pieces of data populate, even though they ARE on the page I'm scraping.

If looked at If, IfNot, IfOutput, IfNotOutput, but they don't seem to fit my use.

Is there a way around this problem?


I've been having the same problem for a couple of weeks but just stumbled across the answer. Add a 3rd parameter to the findline command. eg

findline "certificates=ZZ" 1 fails with an error if certificates=ZZ is not found, but

findline "certificates=ZZ" 1 1 allows the script to continue

hope this helps
Go to the top of the page
 
+Quote Post
pints1ze
post Jan 12 2018, 02:21
Post #3


Member


Group: Members
Posts: 2
Joined: 3-November 17
Member No.: 24127
Mp3tag Version: 2.84a



QUOTE (Fatduckz @ Jan 10 2018, 17:15) *
I've been having the same problem for a couple of weeks but just stumbled across the answer. Add a 3rd parameter to the findline command. eg

findline "certificates=ZZ" 1 fails with an error if certificates=ZZ is not found, but

findline "certificates=ZZ" 1 1 allows the script to continue

hope this helps


Thank you! I will have to try that out.
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: 16th January 2018 - 22:23