Loading app.py +1 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ async def find(id): "ya": yairc(id), "wbm": wbm(id), "ia": iai(id), "filmot": filmot(id), "ghostarchive": ghostget(id) } Loading config.example.py +3 −0 Original line number Diff line number Diff line Loading @@ -2,3 +2,6 @@ class ya: enabled = False username = "fill this in" password = "fill this in" class filmot: key = "fill this in" findmedia.py +14 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,20 @@ def ghostget(vid): GCACHE[vid] = ret return ret FILNOTE = "Filmot only provides metadata, not the actual video." FILNAME = "Filmot (metadata only)" FILCACHE= {} def filmot(vid): if FILCACHE.get(vid) and time.time() - FILCACHE[vid]["lastupdated"] < 10: return FILCACHE[vid] key = config.filmot.key res = requests.get(f"https://filmot.com/api/getvideos?key={key}&id={vid}") data = res.json() archived = bool(data) ret = {"archived": archived, "suppl": None, "rawraw": res.text, "lastupdated": time.time(), "note": FILNOTE, "name": FILNAME, "available": False} FILCACHE[vid] = ret return ret YACACHE = {} YANOTE = "To retrieve a video from #youtubearchive, join #youtubearchive on hackint IRC and ask for help. Remember <a href='https://wiki.archiveteam.org/index.php/Archiveteam:IRC#How_do_I_chat_on_IRC?'>IRC etiquette</a>!" YANAME = "#youtubearchive" Loading templates/init.html +1 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ button { .then((response) => response.json()) .then((data) => { let write = "<ul>"; let keys = ["wbm", "ia", "ghostarchive", "ya"] let keys = ["wbm", "ia", "ghostarchive", "ya", "filmot"] keys.forEach((key) => { let wbm = data[key]; let archived = wbm.archived ? "<span class='grn'>Archived</span>" : "<span class='red'>Not Archived</span>"; Loading Loading
app.py +1 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ async def find(id): "ya": yairc(id), "wbm": wbm(id), "ia": iai(id), "filmot": filmot(id), "ghostarchive": ghostget(id) } Loading
config.example.py +3 −0 Original line number Diff line number Diff line Loading @@ -2,3 +2,6 @@ class ya: enabled = False username = "fill this in" password = "fill this in" class filmot: key = "fill this in"
findmedia.py +14 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,20 @@ def ghostget(vid): GCACHE[vid] = ret return ret FILNOTE = "Filmot only provides metadata, not the actual video." FILNAME = "Filmot (metadata only)" FILCACHE= {} def filmot(vid): if FILCACHE.get(vid) and time.time() - FILCACHE[vid]["lastupdated"] < 10: return FILCACHE[vid] key = config.filmot.key res = requests.get(f"https://filmot.com/api/getvideos?key={key}&id={vid}") data = res.json() archived = bool(data) ret = {"archived": archived, "suppl": None, "rawraw": res.text, "lastupdated": time.time(), "note": FILNOTE, "name": FILNAME, "available": False} FILCACHE[vid] = ret return ret YACACHE = {} YANOTE = "To retrieve a video from #youtubearchive, join #youtubearchive on hackint IRC and ask for help. Remember <a href='https://wiki.archiveteam.org/index.php/Archiveteam:IRC#How_do_I_chat_on_IRC?'>IRC etiquette</a>!" YANAME = "#youtubearchive" Loading
templates/init.html +1 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ button { .then((response) => response.json()) .then((data) => { let write = "<ul>"; let keys = ["wbm", "ia", "ghostarchive", "ya"] let keys = ["wbm", "ia", "ghostarchive", "ya", "filmot"] keys.forEach((key) => { let wbm = data[key]; let archived = wbm.archived ? "<span class='grn'>Archived</span>" : "<span class='red'>Not Archived</span>"; Loading