jeudi 27 octobre 2016

Downloading a mp3 with requests module?

im having a trouble understanding the module requests, i understand that http have post,get, put, delete methods, but i think i need to know more about how requests works, i have read the documentation but still i have a lot of questions about how to do something, this is the first time i try to make a script for web without selenium or mechanize

im trying to interact with vubey.yt, but i cant make my vubey url change at what i want(or what i see when i manually use the pag) i can send my data, and it changes the url, but if i copy that url and navigate manually, it does nothing... so i dont understand whats happening, because i dont have any visual clue

here is my code (python 3.5):

def Descarga(youtubeid):
       # also i have tried only sending videoURL without quality and sub, but is the same
        r = requests.get('https://vubey.yt/', params={'videoURL': youtubeid, 'quality': '320', 'submit': 'Convert+To+MP3'})

        print(r.url, r.status_code)

Descarga("https://www.youtube.com/watch?v=dQw4w9WgXcQ")    

if someone could link me a tutorial for really understand how to use this module or tell me what im doing wrong or misunderstanding about this module i ll thank so much




Aucun commentaire:

Enregistrer un commentaire