Python Forum
How to find link to video file from URL
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to find link to video file from URL
#12
(May-12-2022, 10:57 AM)Pavel_47 Wrote: But after installing yt-dlp in my Ubuntu machine I couldn't find arte.py
Where python files are located ?
The default downloads of yt-dlp is a binary file then you will not find anything.
The easiest way to upgrade to the new arte.py file is to use pip(you can install yt-dlp with pip).

Make a virtual environment and install.
Example.
tom@tom-VirtualBox:~$ python -m venv arte_env
tom@tom-VirtualBox:~$ cd arte_env/
tom@tom-VirtualBox:~/arte_env$ source bin/activate
(arte_env) tom@tom-VirtualBox:~/arte_env$ pip install yt-dlp
Collecting yt-dlp
.....  
Successfully installed brotli-1.0.9 certifi-2021.10.8 mutagen-1.45.1 pycryptodomex-3.14.1 websockets-10.3 yt-dlp-2022.4.8  

(arte_env) tom@tom-VirtualBox:~/arte_env$ ls
bin  include  lib  lib64  pyvenv.cfg  share
So at this point i go into lib64 eg for me arte_env/lib64/python3.10/site-packages/yt_dlp/extractor/arte.py
Replace all content with file from Axel_Erfurt post and save.
Then go into bin folder and test that it work.
(arte_env) tom@tom-VirtualBox:~/arte_env$ cd bin
(arte_env) tom@tom-VirtualBox:~/arte_env/bin$ ls
activate      activate.fish  mid3cp     mid3v2     mutagen-inspect  pip   pip3.10  python3     yt-dlp
activate.csh  Activate.ps1   mid3iconv  moggsplit  mutagen-pony     pip3  python   python3.10
(arte_env) tom@tom-VirtualBox:~/arte_env/bin$ yt-dlp https://www.arte.tv/en/videos/101139-013-A/geo-reportage/
[ArteTV] 101139-013-A: Downloading JSON metadata
[ArteTV] 101139-013-A: Downloading m3u8 information
[ArteTV] 101139-013-A: Downloading m3u8 information
[ArteTV] 101139-013-A: Downloading m3u8 information
[ArteTV] 101139-013-A: Downloading m3u8 information
[ArteTV] 101139-013-A: Downloading m3u8 information
[ArteTV] 101139-013-A: Downloading m3u8 information
[ArteTV] 101139-013-A: Downloading m3u8 information
[ArteTV] 101139-013-A: Downloading m3u8 information
[info] 101139-013-A: Downloading 1 format(s): VOEU-STE_ANG_-2328+VOEU-STE_ANG_-program_audio_0-VOEU
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 322
[download] Destination: Geo Reportage [101139-013-A].fVOEU-STE_ANG_-2328.mp4
[download] 100% of 1011.63MiB in 07:03
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 322
[download] Destination: Geo Reportage [101139-013-A].fVOEU-STE_ANG_-program_audio_0-VOEU.mp4
[download] 100% of 59.97MiB in 03:43
[Merger] Merging formats into "Geo Reportage [101139-013-A].mp4"
From a Python file it will be like this.
import yt_dlp

ydl_opts = {}
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
    ydl.download(['https://www.arte.tv/en/videos/101139-013-A/geo-reportage/'])
Pavel_47 likes this post
Reply


Messages In This Thread
RE: How to find link to video file from URL - by snippsat - May-12-2022, 12:51 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How find link element zinho 3 3,265 Mar-31-2020, 12:29 PM
Last Post: snippsat
  get link and link text from table metulburr 5 6,543 Jun-13-2019, 07:50 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020