Check-in [a30ddba7a7]
Overview
Comment: | Removed some negotation headers |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
a30ddba7a72667d7afa3c6a904a02085 |
User & Date: | mario on 2014-07-31 01:14:44 |
Other Links: | manifest | tags |
Context
2014-07-31
| ||
01:14 | Shorter YT urls. check-in: 883ba616fa user: mario tags: trunk | |
01:14 | Removed some negotation headers check-in: a30ddba7a7 user: mario tags: trunk | |
01:13 | PLUGIN DISABLED Reads out streams now (grouping wrong), but even with session ID there's no playback of manually construed URLs. check-in: 0045ccdb36 user: mario tags: trunk | |
Changes
Modified ahttp.py from [154714b751] to [31cf3bd93f].
︙ | ︙ | |||
40 41 42 43 44 45 46 | # prepare default query object session = requests.Session() # default HTTP headers for requests session.headers.update({ "User-Agent": "streamtuner2/2.1 (X11; U; Linux AMD64; en; rv:1.5.0.1) like WinAmp/2.1", | | | | < < < < | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | # prepare default query object session = requests.Session() # default HTTP headers for requests session.headers.update({ "User-Agent": "streamtuner2/2.1 (X11; U; Linux AMD64; en; rv:1.5.0.1) like WinAmp/2.1", "Accept": "*/*", "Accept-Language": "en-US,en,de,es,fr,it,*;q=0.1", "Accept-Encoding": "gzip, deflate", "Accept-Charset": "UTF-8, ISO-8859-1;q=0.5, *;q=0.1", }) #-- Retrieve data via HTTP # # Well, it says "get", but it actually does POST and AJAXish GET requests too. |
︙ | ︙ | |||
75 76 77 78 79 80 81 | # read if post: r = session.post(url, params=params, headers=headers) else: r = session.get(url, params=params, headers=headers) | | | | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | # read if post: r = session.post(url, params=params, headers=headers) else: r = session.get(url, params=params, headers=headers) __print__( dbg.HTTP, r.request.headers ); __print__( dbg.HTTP, r.headers ); # result #progress_feedback(0.9) content = (r.content if binary else r.text) # finish, clean statusbar progress_feedback("") |
︙ | ︙ |