Check-in [8ede46a0a1]
Overview
Comment: | More specific log.HTTP messages (GET vs POST) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
8ede46a0a193cef7e7a58a21ef184432 |
User & Date: | mario on 2015-05-02 05:39:44 |
Other Links: | manifest | tags |
Context
2015-05-02
| ||
05:41 |
Implement custom HTML .entitiy_decode, because SAX didn't honor any HTML;
and HTMLParser would require customized/compat2and3 imports.
Colorize channel labels if #color: is specified in any plugins. And provide @use_rx decorator to alternate between regex/pyquery extractors. check-in: 5588baf6dd user: mario tags: trunk | |
05:39 | More specific log.HTTP messages (GET vs POST) check-in: 8ede46a0a1 user: mario tags: trunk | |
2015-05-01
| ||
23:30 | Prepare row() and play() wrappers. No genre requests yet. (Still just a planned channel pugin.) check-in: 34f8a3d27b user: mario tags: trunk | |
Changes
Modified ahttp.py from [ea4d4f2fe5] to [4ef18dd32d].
︙ | ︙ | |||
50 51 52 53 54 55 56 | #-- Retrieve data via HTTP # # Well, it says "get", but it actually does POST and AJAXish GET requests too. # def get(url, params={}, referer="", post=0, ajax=0, binary=0, feedback=None, content=True, verify=False): | < > > | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | #-- Retrieve data via HTTP # # Well, it says "get", but it actually does POST and AJAXish GET requests too. # def get(url, params={}, referer="", post=0, ajax=0, binary=0, feedback=None, content=True, verify=False): # statusbar info progress_feedback(url) # combine headers headers = {} if ajax: headers["X-Requested-With"] = "XMLHttpRequest" if referer: headers["Referer"] = (referer if referer else url) #ifdef BLD_DEBUG #srcout raise Exception("Simulated HTTP error") #endif # read if post: log.HTTP("POST", url, params) r = session.post(url, params=params, headers=headers, timeout=7.5) else: log.HTTP("GET"+(" AJAX" if ajax else ""), url, params ) r = session.get(url, params=params, headers=headers, verify=verify, timeout=9.75) log.HTTP(">>>", r.request.headers ); log.HTTP("<<<", r.headers ); # finish, clean statusbar #progress_feedback(0.9) |
︙ | ︙ |