Anders Waldenborg
baa8d76551
Add get_urldata() method to service
...
self.get_urldata() is eqivalent to get_http_data(self.url), but
also caches the data, so no additional requests are made if it
is called multiple times (e.g when grabbing title or downloading
thumbnail).
Generic().get(url) still causes it to be fetched an extra time.
2014-02-18 19:00:20 +01:00
Anders Waldenborg
904e16d457
Split out opengraph getter to separate function
...
...and add doctests
2014-02-18 19:00:20 +01:00
Anders Waldenborg
5fe5eb40f2
Fix automatic filename generation when output is a directory
2014-02-18 18:59:18 +01:00
Johan Andersson
35827e7e6e
New version 0.9.2014.02.15
2014-02-15 11:33:25 +01:00
Olof Johansson
f695063307
Reraise UIExceptions when called with --verbose
2014-02-11 18:46:54 +01:00
Olof Johansson
8e46384048
hds: Error on live streams
...
This can be overriden using the --force flag.
2014-02-11 18:46:53 +01:00
Olof Johansson
b9107b20b6
hls: Error on live streams
...
This can be overriden using the --force flag, but the output may
be a bit disappointing --- only the current state of the HLS
playlist is downloaded, and no reload is attempted.
2014-02-11 18:46:53 +01:00
Olof Johansson
045ef96252
logging: adjust message format, <level>: <message>
2014-02-11 18:46:53 +01:00
Olof Johansson
a89127c384
sr: add http scheme to url only if it's missing
2014-02-11 18:46:37 +01:00
Johan Andersson
0a88eb1009
svtplay: sometimes subtitleReferences is None
2014-02-11 18:16:26 +01:00
Johan Andersson
85e286937a
Merge pull request #63 from olof/topic/twitch-fixes
...
Add HLS support for Twitch/Justin
2014-02-09 20:59:11 +01:00
Johan Andersson
c7634399a7
generic: detect embeded svtplay streams
2014-02-08 22:47:47 +01:00
Olof Johansson
3aef528b5d
justin: Add HLS support
2014-02-08 17:40:25 +01:00
Olof Johansson
159d0d929d
justin: refactoring
...
Break out logic for video and channel fetching to functions and introduce a
JustinUrlException class, that represents faulty URLs.
2014-02-08 17:40:25 +01:00
Olof Johansson
38b3c7820b
hls: automatically detect baseurl
2014-02-08 17:40:25 +01:00
Olof Johansson
b50fd6b907
Fix pylint anomalous-backslash-in-string warnings
...
Also, avoid having to escape " in strings by delimiting it with '
instead.
2014-02-08 17:31:54 +01:00
Olof Johansson
e8dc4781db
urllib: export quote (url encoding)
2014-02-08 17:10:58 +01:00
Johan Andersson
701ce4fcdc
aftonbladet: support for the new site
2014-02-05 23:15:19 +01:00
Johan Andersson
a7b114398b
kanal5: print error message when we see drm
2014-02-05 22:13:26 +01:00
Johan Andersson
05364d2f08
viaplay: some streams need live flag set
2014-02-05 22:03:16 +01:00
Johan Andersson
3ad91fcdf4
viaplay: support for tvplay.lv
2014-02-05 21:50:31 +01:00
Johan Andersson
16c7240f53
viaplay: print the geolock error message.
2014-02-05 21:46:19 +01:00
Johan Andersson
e26a32e140
sr: this will work with the new site from last year.
2014-02-05 21:34:58 +01:00
Johan Andersson
a3c74d2ac1
generic: support for embed bambuser streams
2014-02-05 20:43:28 +01:00
Johan Andersson
ab4d50beed
bambuser: new service
2014-02-05 20:43:28 +01:00
Olof Johansson
d4b03b53af
make: Make shebang line overrideable
2014-02-05 18:52:31 +01:00
Johan Andersson
1a329ecae7
qbrick: they are using space in the path.
2014-02-05 12:42:11 +01:00
Johan Andersson
3d44657775
viaplay: they changed the urls
...
maybe look for a better way to detect the id?
2014-02-05 12:28:10 +01:00
Johan Andersson
2844e0dc33
generic: detect embeded tv4play streams
2014-02-04 20:20:36 +01:00
Johan Andersson
a7c9043301
urplay: better handling for HD streams
2014-02-02 18:22:35 +01:00
Johan Andersson
fd5801965a
viaplay: support for thumbnail
2014-01-26 01:54:20 +01:00
Johan Andersson
dfe756afe9
vimeo: support for thumbnail
2014-01-26 01:52:11 +01:00
Johan Andersson
f3ede2ae15
dr: support for thumbnail
2014-01-26 01:51:53 +01:00
Johan Andersson
b4238d708e
nrk: support for thumbnail
2014-01-26 01:51:35 +01:00
Johan Andersson
ef3834dcfb
nrk: better support for nrk.no
2014-01-26 01:50:54 +01:00
Johan Andersson
7c1320c366
nrk: support for domain tv.nrk.no
2014-01-26 01:27:45 +01:00
Johan Andersson
f37353deb0
qbrick: support for thumbnail.
2014-01-26 01:19:47 +01:00
Johan Andersson
77e2235b48
OpenGraphThumbMixin: more matches for this.
...
I saw this variant on dn.se
2014-01-26 01:19:17 +01:00
Johan Andersson
7010adc6e6
utils: use FIREFOX_UA in check_redirect
2014-01-25 23:53:09 +01:00
Anders Waldenborg
b1871b3834
Add --thumbnail
...
Names thumbnails as $basename.tbn (Hi xbmc!)
2014-01-25 22:57:50 +01:00
Anders Waldenborg
9804d80302
Split subtitle getting to separate method
2014-01-25 22:57:50 +01:00
Anders Waldenborg
f331a653b6
Move url to object attribute
2014-01-25 22:57:50 +01:00
Anders Waldenborg
231eaf00e6
Make Service.handles a classmethod
...
This way it can be called without instantiating the class.
2014-01-25 22:57:49 +01:00
Anders Waldenborg
dcf4c1bd23
Add doctests for new functions in utils
...
The print call is there to make it py2/3 compatible (py2 adds u'' where py3 just adds '')
2014-01-25 22:57:49 +01:00
Anders Waldenborg
9d3ffd07d8
Fix reverse logic in io
2014-01-25 22:57:49 +01:00
Anders Waldenborg
d6ab73679e
Improve title to filename conversion.
...
Does unicode NFD decomposition on the string before stripping non ascii chars.
This means that chars like 'ü' is decomposed into 'u' and '¨', which mean that
when non-ascii chars are dropped we will still keep the 'u'.
Fixes #60
2014-01-25 22:57:37 +01:00
Anders Waldenborg
712901cc8e
Decode html entities in title tag
2014-01-25 13:01:01 +01:00
Anders Waldenborg
0671b2418e
Display http request urls and time with --verbose
2014-01-25 13:01:01 +01:00
Anders Waldenborg
06023e5b04
Add --verbose option
2014-01-25 13:01:01 +01:00
Anders Waldenborg
db426b804c
Fix slow regex for grabbing title-tag.
...
Changes regex to not allow matching overlapping matches, which
made compilation of the regex noticeable slow.
2014-01-25 13:01:01 +01:00
Johan Andersson
560145a4ff
New version 0.9.2014.01.18
...
python3 support for HDS, more viaplay sites and hd support for urplay
2014-01-18 18:56:17 +01:00
Johan Andersson
14b888b09e
viaplay: support for tv[36]play.{dk,no,lv,ee,lt and viasat4play.no
2014-01-16 21:41:59 +01:00
Johan Andersson
7e591c2733
get_media: dont add options.output to tmp variable
2014-01-16 20:57:30 +01:00
Johan Andersson
b14ba49f74
get_media: output to dir and get automagic name again.
...
removed it in f51d804d
. but this one is better
2014-01-16 19:46:28 +01:00
Johan Andersson
08be2f55cb
svtplay: add support for beta.s.s
2014-01-16 12:33:54 +01:00
Johan Andersson
ec8fe2a5b9
tv4play: print error message when there is no streams
2014-01-15 19:21:05 +01:00
Johan Andersson
dcdfbd1e4e
urplay: support for HD streams
2014-01-09 00:32:14 +01:00
Johan Andersson
e63e23bd70
urplay: missing imports
2014-01-08 23:36:57 +01:00
Johan Andersson
b5e67876c4
hds: python3 support
2014-01-07 20:52:03 +01:00
Johan Andersson
c24123dc61
service: missing urlparse for py3
2014-01-05 17:28:00 +01:00
Johan Andersson
89ab7259b7
New version with for urplay
2014-01-03 16:55:56 +01:00
Johan Andersson
2972555cbc
urplay: forgot to remove old line..
2014-01-03 16:53:48 +01:00
Johan Andersson
c7dfdcf6f5
New version with fixes for viaplay, urplay and dr.
2014-01-03 16:40:19 +01:00
Johan Andersson
21916bbf78
Merge pull request #58 from olof/topic/default_handles_method
...
Refactor our handles() method to baseclass
2014-01-03 07:10:32 -08:00
Johan Andersson
959c3ad599
get_media: with this it takes forever to get the titel.
2014-01-03 12:23:44 +01:00
Johan Andersson
a80a41974a
urplay: it is not necessary to replace characters anymore
2014-01-03 12:15:21 +01:00
Olof Johansson
e838384c52
Support supported_domains regexp for services
...
Lets services with more complex domains (like domains with language/country
codes) use a regular expressions that will match the supported domains for
the handles() method.
2014-01-01 16:22:07 +01:00
Olof Johansson
436090ddf9
Rename Service's handle method to handles
...
handle can be ambiguous (i.e, not a verb).
Signed-off-by: Olof Johansson <olof@ethup.se>
2014-01-01 16:22:07 +01:00
Olof Johansson
9f9bcad0c7
Add default handle method in Service base class
...
The default handle method will look for a supported_domains attribute
(a list), containing the supported domains. The subclassed service
class can of course override this if other means of determining support
is needded.
2014-01-01 16:22:07 +01:00
Olof Johansson
dfeadd152c
urplay: fix pylint warning (anomalous-backslash-in-string)
2014-01-01 16:21:35 +01:00
Olof Johansson
768558a0a6
justin: exit with failure if regexp does not match
...
This change will avoid an ugly stacktrace, but the issue is still present. The
"real" error message won't be drowned out though.
2014-01-01 16:06:54 +01:00
Johan Andersson
9345284547
Make pylint bit happier
2013-12-30 01:43:59 +01:00
Johan Andersson
9b5a67e874
dr: missing imports
2013-12-30 01:39:05 +01:00
Johan Andersson
cceb60f8b3
get_http_data: use space instead of tab one line
2013-12-30 01:37:13 +01:00
Johan Andersson
33bb2c5c13
Replace sys.version_info with pyX
2013-12-30 01:35:08 +01:00
Johan Andersson
b09fc7b319
get_media: remove html entities in titel
2013-12-30 01:12:38 +01:00
Johan Andersson
f51d804d4f
get_media: options.output could never happen
2013-12-30 01:02:42 +01:00
Johan Andersson
e0e75f5116
rtmp: we always get an .flv file not mp4
2013-12-29 18:38:39 +01:00
Johan Andersson
ed7f18b2af
viaplay: they use longer first dirname nowdays
2013-12-25 19:26:40 +01:00
Johan Andersson
af0bfdde00
viaplay: only match numeric id:s
2013-12-22 21:28:42 +01:00
Johan Andersson
14b93c0cef
New version
...
tv4play fixes
outputfilename fix when title tag is on more then one line.
2013-12-11 17:25:53 +01:00
Johan Andersson
dbcf83e519
options: set default quality to 0
2013-12-11 17:22:46 +01:00
Johan Andersson
facfc6833b
output: fixes a problem when title-tag is on multiple lines.
2013-12-11 17:19:15 +01:00
Johan Andersson
7ce8f4a8a2
tv4play: select mp4 for mediaformat
2013-11-17 13:32:33 +01:00
Johan Andersson
8071ca12a3
New version: svtplay and vimeo fixes
2013-11-15 00:27:49 +01:00
Johan Andersson
35c54623ad
vimeo: don't depend on lxml now.
2013-11-14 22:56:32 +01:00
Johan Andersson
78e3da190f
Merge pull request #55 from antoneliasson/master
...
Fixed Vimeo module.
2013-11-14 13:47:03 -08:00
Johan Andersson
8df8823893
svtplay: check for ?, if it exists remove it from json request.
2013-11-14 22:46:08 +01:00
Johan Andersson
26bd057689
svtplay: only check swf for rtmp stream
2013-11-14 22:44:46 +01:00
Johan Andersson
8535e6f106
generic: catch embed svt videos.
2013-11-14 22:43:39 +01:00
Anton Eliasson
3e8f8015bd
Fixed Vimeo module.
...
This introduces an external dependency for lxml (http://lxml.de/ ). The standard
library xml.etree doesn't support invalid XML and Vimeo's source is fairly
broken. There are several third party XML parsers so I just chose my favorite.
We might have been able to get away this time by using a regexp search but that
would have introduced brittle code instead.
I've also ripped out some old safeguards that didn't make sense anymore and
put the quality auto-selection code in a separate method. As the quality setting
on Vimeo is a string (hd, sd or mobile), we can't use
svtplay_dl.utils.select_quality which just picks the highest number in a list.
Signed-off-by: Anton Eliasson <devel@antoneliasson.se>
2013-11-12 21:00:58 +01:00
Johan Andersson
50aab78454
New version with svtplay and subtitle_tt fix
2013-10-28 20:22:18 +01:00
Johan Andersson
4348b93167
subtitle_tt: urplay changed from dur till duration
2013-10-28 20:16:12 +01:00
Johan Andersson
dfcd714429
svtplay: replace some urlmatchning with urlparse
2013-10-21 14:01:52 +02:00
Johan Andersson
e3977bf524
New version
2013-10-14 20:24:18 +02:00
Johan Andersson
54ac6ccd3c
hls: dont search for bandwidth at a fixed position.
...
On svtplay they added subtitle info in the playlist.
Beacuse of that the script crashed when we tried to access it
2013-10-14 20:18:09 +02:00
Johan Andersson
71b1b585d0
svtplay: fixing a regression from last version
2013-10-14 20:05:03 +02:00
Johan Andersson
d549f7c374
New version
2013-10-08 22:17:13 +02:00
Johan Andersson
0cec19b780
svtplay: correct condition for rtmp-streams
2013-10-08 18:36:23 +02:00
Johan Andersson
d3b181f90e
svtplay: bring back rtmp support
2013-10-08 15:27:00 +02:00