<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      python在B站爬糖豆廣場舞

      先附上代碼:

      import requests,re
      from lxml  import etree
      
      #這是單頁面下載,翻頁的目前還不會 url
      = 'https://search.bilibili.com/all?vt=96737335&keyword=%E7%B3%96%E8%B1%86%E5%B9%BF%E5%9C%BA%E8%88%9E' headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', 'referer':'https://www.bilibili.com/' } res = requests.get(url,headers=headers) # print(res.text) html = etree.HTML(res.text) links = html.xpath('//*[@id="i_cecream"]/div/div[2]/div[2]/div/div/div/div[2]/div/div[*]/div/div[2]/div/div/a/@href') # print(links) for link in links: link = 'https:'+ link # print(link) url_res = requests.get(link,headers=headers) url_html = etree.HTML(url_res.text) #視頻名 title = url_html.xpath('//*[@id="viewbox_report"]/h1/text()')[0] title2 = re.sub('\W','',title) # print(title2) # 獲取音頻URL get_ad = re.findall(r'"id":30280,"baseUrl":"(.*?)","base_url"',url_res.content.decode()) get_ad2=[] if not get_ad: # print('列表為空') continue else: # print(get_ad[0]) get_ad2 = get_ad # get_ad = re.findall(r'"id":17,"baseUrl":"(.*?)","base_url"',url_res.content.decode()) #獲取視頻url get_vd = re.findall(r'"id":32,"baseUrl":"(.*?)","base_url"',url_res.content.decode()) get_vd2 = [] if not get_vd: continue else: get_vd2 = get_vd # print(get_vd2) # with open('log2.txt','wb') as f: # f.write(get_vd2) headers2 = { 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', 'referer':'https://www.bilibili.com', } # 第二次發送請求,請求視頻 # print('1111') res_ad = requests.get(get_ad2[0],headers=headers2) res_vd = requests.get(get_vd2[0],headers=headers2) # res2 = res_ad.content print('1111') with open(f'video/{title2}ad.mp4','wb') as f: f.write(res_ad.content) with open(f'video/{title2}vd.mp4','wb') as f: f.write(res_vd.content) print(f'{title2}視頻下載完成!') from moviepy.editor import * vd = VideoFileClip(f"video/{title2}vd.mp4") au = AudioFileClip(f"video/{title2}ad.mp4") vd2 = vd.set_audio(au) vd2.write_videofile(f"video/{title2}.mp4")

      下載完以后的成果。

       

      posted @ 2024-02-22 08:48  逍遙姐夫  閱讀(143)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 久女女热精品视频在线观看| 国语对白刺激在线视频国产网红 | AV无码免费不卡在线观看| 欧美孕妇乳喷奶水在线观看 | 精品国产三级在线观看| 天堂√最新版中文在线地址| 欧美成人va免费大片视频| 一区二区精品久久蜜精品| 老司机亚洲精品一区二区| 国产精品成| 韩国免费a级毛片久久| 风流老熟女一区二区三区| 久热这里只精品视频99| 中文字幕av一区二区| 潼关县| 亚洲夜色噜噜av在线观看| 午夜福利片1000无码免费| 成人年无码av片在线观看| 亚洲一区二区中文av| 无码精品国产VA在线观看DVD| 2021亚洲国产精品无码| 激情综合五月| 一区二区三区四区在线不卡高清| 男女猛烈激情xx00免费视频| 国产天美传媒性色av| 少妇伦子伦情品无吗| 宾馆人妻4P互换视频| 国产精品中文第一字幕| 日韩国产精品一区二区av| 日本夜爽爽一区二区三区| 国产精品综合av一区二区| 国产成人精品视频不卡| 怀安县| 日本强好片久久久久久aaa| 无套内谢少妇毛片aaaa片免费| 深夜免费av在线观看| 久久综合88熟人妻| 丝袜美腿亚洲综合第一页| 亚洲另类激情专区小说婷婷久| 亚洲乱码一区二区三区视色| 欧美日韩人成综合在线播放|