Failed to add to the download queue videos with a "/" on the title

Bug #215166 reported by antback
2
Affects Status Importance Assigned to Milestone
PyTube
Fix Committed
Medium
Marcos

Bug Description

I have notice that on the function: AddSearch the video is obtained by doing a split("/", ...). If a video contains on the title a slash, "/", the video id is not obtained.

Howto reproduce:
    1.- Open pytube
    2.- Download videos
    3.- Search "JustinSandercoe wish"
    4.- Results:
           034 Pink Floyd - Wish You Were Here 1/4 (justinguitar.com
           035 Pink Floyd - Wish You Were Here 2/4 (justinguitar.com
           036 Pink Floyd - Wish You Were Here 3/4 (justinguitar.com
           037 Pink Floyd Wish You Were Here 4 of 4 (justinguitar.com)
    5.- Select all the videos from above.
    6.- Only the 037 is downloaded.

I have done a workaround on my local copy to make it work:
 def AddSearch(self, widget):
                (model,iter) = self.movies.get_selection().get_selected()
                url = model.get_value(iter,1)
                r = re.search('(<i>)(.*)(<\/i>)', url)
                url = "http://www.youtube.com/watch?v=" + os.path.basename(r.group(2))

I hope it helps. Thanks for sharing your job :)

Revision history for this message
Marcos (marcosrdz) wrote :

0.0.11.5 will have this fixed.

Changed in pytube:
assignee: nobody → marcosrdz
importance: Undecided → Medium
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.