Commit Graph

34 Commits

Author SHA1 Message Date
henryptung
79fd1255cb Encoding handling fixes:
1. Introduce string.safe_chars, safe_print as ways to ensure that a
string is encodable using the specified encoding.  Unsafe characters
are replaced with '?'.  safe_print delegates to print and satisfies
the same interface, so it can be used as a drop-in override for print
in any file.

2. Move get_filename to fs, since that's where it belongs (fs-related
filename handling).  Move appending of ID, part number, and extension
(when applicable) to get_filename, to avoid accidental truncation.

3. Remove common.tr, since the print override supercedes it.

4. Refactor of log module to work with changes (use print with different
files instead of direct writes to stdout, stderr).

5. Modify other files to accommodate the changes (remove calls to tr)

6. Random cleanup I found:

a. Some changes to impl of download_urls, download_urls_chunked (is this
one even used?)).
b. sina_download_by_id?
c. ffmpeg_convert_ts_to_mkv tries to convert multiple input files onto
the same output file, overwriting its own output each time?
d. @staticmethod annotations (IDE sads otherwise).

7. Tests for the new encoding handling.
2015-01-10 22:13:09 -08:00
Mort Yao
e75be00bc1 remove test_ted() 2014-08-06 17:38:28 +02:00
Mort Yao
7f2f203510 fix tests 2014-07-21 03:17:30 +02:00
Mort Yao
55fc2a6bd4 remove all Sohu test cases 2014-02-22 18:43:16 +01:00
Mort Yao
ee02015c18 add test case: Magisto.com 2014-02-14 21:58:43 +01:00
Mort Yao
da4506c4e7 fix url_to_module 2014-02-14 21:09:57 +01:00
Mort Yao
a1f635df94 Sohu: remove some error-prone test case 2014-01-08 05:03:59 +01:00
Mort Yao
00196dc1a1 Sohu: remove some tests (video deleted) 2014-01-01 23:06:28 +01:00
Mort Yao
987ee1cbf3 add test for: Sohu 2013-10-31 23:51:46 +01:00
Mort Yao
c3f5f6a320 add new module: util.fs 2013-10-30 00:19:08 +01:00
Mort Yao
bf5d2dfbce YouTube: fix #252 2013-10-18 14:49:29 +02:00
Mort Yao
51c56e540a add tests for TED 2013-10-18 14:31:08 +02:00
Mort Yao
9393e770ac remove test_xiami because it fails CI build too often 2013-10-08 14:35:59 +02:00
Mort Yao
d1d02fe7ae downloader -> extractor 2013-09-11 13:45:34 +02:00
Mort Yao
60d0dd768b fix regression d1fa95c 2013-07-26 10:44:51 +08:00
Mort Yao
c4db743bdb add tests.test_common 2013-07-11 16:48:28 +08:00
Mort Yao
fdc9d81c86 remove test of JPopsuki 2013-07-11 11:11:45 +08:00
Mort Yao
a716b5f0c1 temporarily remove JPopuuki from tests 2013-05-04 00:06:25 +02:00
Mort Yao
7d3beda2a8 update tests 2013-04-19 15:05:07 +02:00
Mort Yao
77e3f0da9b remove test for Google+ 2013-04-16 21:33:32 +02:00
Mort Yao
a26da57c52 remove test for vid48 2013-04-11 18:30:13 +02:00
Mort Yao
b49f1a57f5 add test for Freesound 2013-04-10 17:41:23 +02:00
Mort Yao
bd5d56d6af remove test for Blip 2013-04-05 03:21:36 +02:00
Mort Yao
68c49b90e7 version 0.3.4: add support for Blip; fix #67, #125 2013-03-07 23:51:55 +01:00
Mort Yao
e74864ac34 remove tests for Douban 2013-03-07 18:49:13 +01:00
Mort Yao
b474f81f5f add support for VID48, fix #124 2013-03-07 16:34:14 +01:00
Mort Yao
c17201338c use test_urls() 2013-02-28 22:02:12 +01:00
Mort Yao
5732df0137 add test case for YouTube 2013-02-28 21:46:31 +01:00
Mort Yao
9cbc563c65 add test case for Vimeo 2013-02-28 21:43:44 +01:00
Mort Yao
cd1498f82d add support for Douban, fix #112 2013-02-23 19:43:52 +01:00
Mort Yao
68a7cfd0d6 add testcase of Xiami 2013-02-17 19:39:37 +01:00
Mort Yao
d8515ab413 add support for JPopsuki, fix #92 2013-02-16 22:35:04 +01:00
Mort Yao
dbe490f518 fix test.py 2013-02-15 00:21:20 +01:00
Mort Yao
2b47ccd5d2 add unit tests 2013-02-12 22:04:39 +01:00