Let's say there are several posts.
They all have unique post ids as you may know.
We keep refreshing and get new posts.
Process
- Refresh
- Find strings on the title. ( we just need to search and check strings what we are looking for )
- Click
.. and ... - Done
But we also need to check if we already clicked on the post or not.
Therefore we need to get the post ID and save it somewhere ( I guess clipboard ) and check.
The code looks like this. Unfortunately, the post ID is not only numbers.
indent preformatted text by 4 spaces
<ul>
<li id="postid-12ree" class="mypost"> <a href="...">Post Title</a></li>
<li id="postid-12fewf" class="mypost"> <a href="...">Post Title</a></li>
<li id="postid-1233fwww" class="mypost"> <a href="...">Post Title</a></li>
<li id="postid-12erwss" class="mypost"> <a href="...">Post Title</a></li>
</ul>
I am trying to get the id or class by querySelector.
But I am not sure how I can save the listing ID and check if I clicked.
Is there any way to do?
The posts look like this.
Whenever you click refresh, new posts come. It can be NEW 1 ~3 posts every fresh.
Any advice, your experience would be very helpful and appreciated.
Thank you,