Jump to content
UBot Underground

How can I get the link from "viewpost" link when I posted a new post in WordPress?


Recommended Posts

This question may seem to be very simple but I have wasted my whole day without a solution.

 

I made a simple bot which posts an article as a new post (wordpress). Everything works as it should be. But after post is completed, I want to take the URL of the new post.

 

I tried to get it from viewpost link (when you finished posting, a new line added as view post). Below is the html code of that section

 

<P sizcache="20" sizset="48">Post published. <A id=postlink href="http://*.*.com/the-name-of-my-new-page/">View post</A></P></DIV>

 

Please see the picture of code snippet, and I wait for your suggestions.

post-352-12936370600055_thumb.jpg

Link to post
Share on other sites

Hi - you should be fine with the example I gave

 

If however you are scheduling tasks then you will need to choose by attribute - inner text "preview post"

 

then scrape the url

 

you should be good with the code noted in the image though

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...