diff --git a/filler.py b/filler.py index 22aba1e..877e350 100755 --- a/filler.py +++ b/filler.py @@ -2,8 +2,8 @@ import argparse, dbtools, filters.filler, requests, setuptools, time, twitools -def downloadMedia(url, tid, mid): - remote = requests.get(url, stream=True) +def downloadMedia(url, tid, mid, two = twitools.twoHelper()): + remote = two.auth.oauth.get(url, auth=two.api.auth.apply_auth()) filename = "media/%s_%i.%s" % (str(tid), int(mid), url.split(".")[-1]) with open(filename, 'wb') as outfile: