Jump to content
UBot Underground

Change relative to absolute URL


Recommended Posts

I have a page of relative URLs scraped from Youtube:

 

/watch?v=MHeX6yg95xU

/watch?v=4V4c1nsjc9o

/watch?v=_drEFOaPaK8

/watch?v=yknBPGkhPgE

 

How do I change the list of relative URLs into absolute URLs like below so each can be navigated to?

 

http://youtube.com/watch?v=4V4c1nsjc9o

 

I've tried $replace, but must be doing something wrong.

Link to post
Share on other sites

Do:

 

set #theabsoluteURL "http://youtube.com/{1}" with {1} being substituted by a variable containing /watch?v=MHeX6yg95xU etc.

 

I have a page of relative URLs scraped from Youtube:

 

/watch?v=MHeX6yg95xU

/watch?v=4V4c1nsjc9o

/watch?v=_drEFOaPaK8

/watch?v=yknBPGkhPgE

 

How do I change the list of relative URLs into absolute URLs like below so each can be navigated to?

 

http://youtube.com/watch?v=4V4c1nsjc9o

 

I've tried $replace, but must be doing something wrong.

  • Like 1
Link to post
Share on other sites

Do:

 

set #theabsoluteURL "http://youtube.com/{1}" with {1} being substituted by a variable containing /watch?v=MHeX6yg95xU etc.

 

Thanks Joe, I appreciate it.

 

When do I set #theabsoluteURL{1} ? Do I add it to a list or to the navigation?

 

Sorry, but I'm still a noob with ubot.

Link to post
Share on other sites

I'd really appreciate if someone can help me out...I've spent a good day and a half on this single problem.

 

Attached is a ubot script that will search ubot and scrape the URLs and save them to a file.

 

Problem is, it saves them as:

/watch?v=MHeX6yg95xU

/watch?v=4V4c1nsjc9o

/watch?v=_drEFOaPaK8

/watch?v=yknBPGkhPgE

 

 

I need them to be so each page can be navigated to (and then scraped):

http://youtube.com/watch?v=4V4c1nsjc9o

 

 

Can anyone please help? I've got the rest of the script finished, but have been hung up on this issue for a while...

YouTube_SERP_URLs.ubot

Link to post
Share on other sites

is this what you are trying to do?? youtube.ubot

 

did you scraped this "watch?v=yknBPGkhPgE"

if so, why not scrape the whole url (href) it's much easier.

 

hope this help..

 

by the way, if you want to try the attached bot, you need to edit the path where you want to save full urls

 

Hi Gwen,

 

Thanks a lot...I'll give your script a try. The reason I didn't scrape the whole URL is because I don't see them in the Youtube SERPs:

 

http://www.youtube.com/results?search_query=test&aq=f

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...