On the web, there are posts and the post titles. Whenever you refresh the page, there are new posts are coming with the post titles.
I need to search for strings that matched with the titles by some conditions.
<a class="mylink">1.Sony Red - Brand New - Model-1 2022 additional words.. iweoueowuo</a><span class="price">$100</span>
<a class="mylink">2.Apple Blue - Brand New - Model-4 2002 additional words.. aafakldajl</a><span class="price">$99</span>
<a class="mylink">3.LG Black - Brand New - Model-8 2022 additional words.. eijfowij</a><span class="price">$101</span>
<a class="mylink">4.Tesla Yellow - Used - Model-9 2000 additional words.. 794799285</a><span class="price">$88</span>
<a class="mylink">5.Xaomi Red - Used - Model-10 2022 additional words.. 8499344</a><span class="price">$80</span>
<a class="mylink">6.Sony Black - Brand New - Model-5 2022 additional words.. 493487987</a><span class="price">$70</span>
<a class="mylink">7.Sony Blue - Brand New - Model-4 2021 additional words.. 4897839798438</a><span class="price">$90</span>
<a class="mylink">8.Samsung White - Used - Model-3 2022 additional words.. 897797899</a><span class="price">$120</span>
Condition 1 (include): "Sony", "Brand New", "2022" (if there are include, True! no1, no6 true! ) Condition 2 (include): "Xaomi", "Brand New", "2022" (if there are include, True!)
So, Condition 1 and Condition 2 are "OR" conditions. One of them is just matched, then True!
Therefore, no1, no5, no6 are True!
Condition 3 (exclude): "Used" - If there is "Used" string, false ( No5 is false! Condition 4 (except): "The price" should be lower than $100
If the condition is true, then "Click".
Is there any way to do this?
Or is there any way to search & match.. "inlucde" or "exclude" strings?
Yes this is doable, but requires a fairly complex JavaScript script.
I'm not sure when I'll have time to devote to this, but to get started you need to provide either the page URL, or a zip file of the HTML source code.
It would also be helpful if you can cleanup your logic with a series of "AND", "OR", and "NOT" with parenthesis to indicated how to combine. For example, your "Condition 1" looks like a series of ANDs:
if (title contains "Sony" AND title contains "Brand New" AND title contains "2022")
OR
etc
I just need to sort, some brand (Sony or Xaomi), good condition ( new or mint ) and 2021 yrs. But NOT Used condition and NOT higher than $100.
<a class="mylink">1.Sony Red - Brand New - Model-1 2022 additional words.. iweoueowuo</a><span class="price">$100</span>
The condition is ...
If ( title contains "Sony" AND title contains ( "Brand New" OR "Mint" ) AND title except "2021" )
OR
If ( title contains "Xaomi" AND title contains ( "Brand New" OR "Mint" ) AND title except "2021" )
AND
If ( title except "Used")
AND
If ( price < $100 )
Then
"CLICK"
I have 1 more condition.
If ( title contains ( "Tesla" OR "BMW" ) )
Then
"CLICK" with a variable "Car"
If it's "Car", then I can add additional action.
I hope it makes sense.
Once again, very much thanks for your attention and time. If you are busy, just leave it.
I will still happy with your time.