Coder Social home page Coder Social logo

artevideos's People

Contributors

alx avatar gu1 avatar mazenovi avatar msyyces8x95 avatar solsticedhiver avatar stefanct avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

artevideos's Issues

Support avconv

:: Recording video(s): #2
:: Downloading to der-prozess-von-budapest--7877760_hd_de.flv
:: Converting to mp4 format
Error: ffmpeg command not found. Conversion aborted.

As you can see ffmpeg is not available in Ubuntu 14.04.
Is it possible to also support avconv?

The video retrieving is broken

The website seems to have changed its interface and arteVIDEOS doesn’t manage to get videos anymore : here’s what happens when I try to download :

arteVIDEOS> url 1
:: Retrieving video info
Traceback (most recent call last):
File "/home/simon/.local/src/arteVIDEOS/arteVIDEOS.py", line 886, in
main()
File "/home/simon/.local/src/arteVIDEOS/arteVIDEOS.py", line 859, in main
MyCmd(options).cmdloop()
File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
return func(arg)
File "/home/simon/.local/src/arteVIDEOS/arteVIDEOS.py", line 370, in do_url
print video.rtmp_url
File "/home/simon/.local/src/arteVIDEOS/arteVIDEOS.py", line 111, in rtmp_url
self.get_data()
File "/home/simon/.local/src/arteVIDEOS/arteVIDEOS.py", line 91, in get_data
self._rtmp_url, self._player_url, self._info = get_rtmp_url(self.url, quality=self.options.quality, lang=self.options.lang)
File "/home/simon/.local/src/arteVIDEOS/arteVIDEOS.py", line 616, in get_rtmp_url
info = extract_info(soup)
File "/home/simon/.local/src/arteVIDEOS/arteVIDEOS.py", line 679, in extract_info
for i in rtc.div.findAll('p'):
AttributeError: 'NoneType' object has no attribute 'div'

Bypass the geo-restriction

Hello,
First, good job for this script, it's pretty cool!
Actually my request is not to report a bug but to include a new feature, if you agree.
The idea is simple: bypass the geolocalisation and the time restriction. To can download any program from anywhere and anytime.
I've recently made a Chrome Extension to break these restrictions. It's quite simple, you just need to override a script from secure.arte.tv (I'm sure you already know that :-)
The problem is, I've never touched Python and BeautifulSoup. And if I understand, BeautifulSoup is just a parser, it means that no javascript is executed? Yes I'm a bit confused about the behavior of your script. But I would love to help and contribute.

Thanks

Code working with current ARTE website?

Hello, does this script still work with the current ARTE website? If yes, I would be very grateful for some advice on what went wrong for me.

python arteVIDEOS.py record --downloaddir=/Volumes/Macintosh\ HD/.../.../arte/ https://www.arte.tv/de/videos/103019-000-A/johann-sebastian-bach-matthaeus-passion/
Traceback (most recent call last):
File "arteVIDEOS.py", line 732, in
main()
File "arteVIDEOS.py", line 709, in main
vid, stripped = args[1][len(VIDEO_URL):len(args[1])].split('/')
ValueError: too many values to unpack

doesn't work anymore.

since new design of arte.tv/plus7 arteVIDEOS crash directly after "plus7" command.
too sad, it was my best help for missed programs on arte.

please, fix the new URL. Thanks in advance.

rtmdump fails for unkown reason

on my current system (archlinux x86_64) arteVIDEOS.py failed to work anymore because of rtmpdump.
when playing, nothing is played because rtmpdump must have returned immediatly with an error.
when recording one get the error:
Error: rtmpdump unrecoverable error

when using another system (an ubuntu 12.04) the playing and recording is working fine

even pasting the rtmdump line below between system leads to the same behavior. one gives an error, the other is working
rtmpdump -r 'rtmp://artestras.fcod.llnwd.net/a3903/o35/mp4:geo/videothek/ALL/arteprod/A7_SGT_ENC_08_048149-000-A_PG_HQ_FR?h=b1da8946108bef07a403527af0556959' -W 'http://videos.arte.tv/blob/web/i18n/view/player_24-3188338-data-5168030.swf?admin=false&autoPlay=true&configFileUrl=http://videos.arte.tv/cae/static/flash/player/config.xml&embed=false&lang=fr&localizedPathUrl=http://videos.arte.tv/cae/static/flash/player/&mode=prod&videoId=7415440&videorefFileUrl=http://videos.arte.tv/fr/do_delegate/videos/the-pirate-bay--7415440,view,asPlayerXml.xml' -o test.flv

very VERY strange as if it was coming from the distro or the kernel...

Python 2.6

Hello and thank you for this wonderful little script :-)

I'm getting this error with python 2.6 :

...
File "arteVIDEOS.py", line 790, in get_term_size
output = subprocess.check_output(['stty', '-a'])
AttributeError: 'module' object has no attribute 'check_output'

I guess python 2.7 is a requirement after all? http://docs.python.org/library/subprocess.html#subprocess.check_output
Let me know!

Bye

record comman line crash

python arteVIDEOS.py record http://www.arte.tv/guide/fr/066359-000-A/le-jour-des-corneilles

crashes with this traceback

:: Retrieving video info
Traceback (most recent call last):
  File "arteVIDEOS.py", line 732, in <module>
    main()
  File "arteVIDEOS.py", line 711, in main
    record(Video(args[1], '', '', options), options.dldir)
  File "arteVIDEOS.py", line 599, in record
    print ':: Recording %s' % video.video_url
  File "arteVIDEOS.py", line 101, in video_url
    self.get_data()
  File "arteVIDEOS.py", line 94, in get_data
    self._video_url = extract_url_video_json(self.vid, self.options.quality)
  File "arteVIDEOS.py", line 582, in extract_url_video_json
    json_vid = json.loads(urllib2.urlopen(url).read())
  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 410, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 448, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found
python arteVIDEOS.py record http://www.arte.tv/guide/fr/066359-000-A/le-jour-des-corneilles
:: Retrieving video info
Traceback (most recent call last):
  File "arteVIDEOS.py", line 732, in <module>
    main()
  File "arteVIDEOS.py", line 711, in main
    record(Video(args[1], '', '', options), options.dldir)
  File "arteVIDEOS.py", line 599, in record
    print ':: Recording %s' % video.video_url
  File "arteVIDEOS.py", line 101, in video_url
    self.get_data()
  File "arteVIDEOS.py", line 94, in get_data
    self._video_url = extract_url_video_json(self.vid, self.options.quality)
  File "arteVIDEOS.py", line 582, in extract_url_video_json
    json_vid = json.loads(urllib2.urlopen(url).read())
  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 410, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 448, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found

plus7 command sometimes crashes

with this traceback

Type "help" to see available commands.
arteVIDEOS> plus7
:: Retrieving plus7 videos list
Traceback (most recent call last):
  File "arteVIDEOS.py", line 740, in <module>
    main()
  File "arteVIDEOS.py", line 706, in main
    MyCmd(options).cmdloop()
  File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop
    stop = self.onecmd(line)
  File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
    return func(arg)
  File "arteVIDEOS.py", line 459, in do_plus7
    self.nav.plus7()
  File "arteVIDEOS.py", line 262, in plus7
    self.request(url)
  File "arteVIDEOS.py", line 252, in request
    videos = extract_videos(data_json, self.options)
  File "arteVIDEOS.py", line 579, in extract_videos
    teaser = v['VDO']['V7T'].strip()
KeyError: 'V7T'

It occurs when program has no teaser

Error: Can't complete request. See /usr/bin/arteVIDEOS --help

Looks like the script doesn't work anymore:

% /usr/bin/arteVIDEOS

Type "help" to see available commands.
arteVIDEOS> plus7
:: Retrieving plus7 videos list
Error: Can't complete request. See /usr/bin/arteVIDEOS --help

It worked yesterday, today I get this message.

Ajustement dynamique du nombre de vidéos

Suite à ma demande d'amélioration que tu as vite mise en place, je viens de la tester et me revoilà !

J'utilise un terminal du type Guake pour avoir un terminal caché en haut de l'écran dont la taille est d
une dizaine de lignes. Si je lance artesVIDEOS et que je demande plus7 par exemple, le nombre de vidéos est restreint et s'adapte bien à la taille de mon terminal.

C'est alors que je décide d'appuyer sur F11 et d'avoir mon terminal en plein écran : next ou plus7 affichent toujours un nombre de vidéos limité mais adapté uniquement à la taille du terminal avant mon passage en plein écran.

De même quand je change le taille du terminal.

C'est pareil avec xterm par exemple.

Tiens, je viens de me rendre compte que c'est pas super si la description d'une vidéo ne tient pas sur une seule ligne (je ne m'en était pas rendu compte avec Guake, mais je viens de voir ça avec xterm).

Bogue de la fonction « record »

Petite histoire d'une fonction qui perd un peu les pédales…

  1. Lancer python2 arteVIDEOS.py ;
  2. « plus7 » ;
  3. record 12 (360°-Géo : Guyane…) ;
  4. Attendre.
--> :: Recording video(s): #12
    :: Downloading to 360_geo-6764922_hd_fr.flv
    :: Converting to mp4 format
    Error: conversion failed.

Si on regarde dans le dossier idoine ce qu'il s'est passé, on trouve un fichier
bien nommé en *.flv de taille nulle.

Si on le fait à la main, voilà ce qu'il se passe.

  1. Lancer python2 arteVIDEOS.py record http://videos.arte.tv/fr/videos/360_geo-6764922.html
  2. Attendre.
--> :: Downloading to 360_geo-6764922_hd_fr.flv
    :: Converting to mp4 format
    Error: conversion failed.

Sur le site d'Arte, la vidéo fonctionne bien. Ça marche tout aussi mal avec
d'autres vidéos, celle-ci était pour l'exemple.

Informations pratiques :
Archlinux x86_64
Python 2.7.3
rtmpdump 2.4
python-beautifulsoup 3.2.0

Limiter le nombre de vidéos en fonction de la taille du terminal

Ça n'est pas vraiment en bogue, mais plus une demande d'amélioration.

Actuellement, si l'on demande la liste des vidéos d'Arte+7 (avec la commande plus7), le nombre de présentation de vidéos affiché est de 25. Il est possible de voir la suite de la liste avec next.

Cependant, il est agréable de pouvoir voir une page de vidéos d'un coup d'œil sans avoir à faire défiler l'écran si le terminal est trop petit.

Peut-être qu'il serait bien si la taille de la page était dynamique et fonction de celle de la longueur du terminal.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.