Commit 17ef79b3 authored by TheTechRobo's avatar TheTechRobo
Browse files

Refine WBM experiment: add slightly more info to report

parent de1a698c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
=== Current Experiments ===

- Wayback Machine: Checks two supposedly equivalent API endpoints. If they don't match, send a report to my server. I have been made aware of a video that is not recognized on the fakeurl endpoint but is recognized on the videoinfo endpoint. Only the video ID is included in the report.
- Wayback Machine: Checks two supposedly equivalent API endpoints. If they don't match, send a report to my server. I have been made aware of a video that is not recognized on the fakeurl endpoint but is recognized on the videoinfo endpoint. The video ID, fakeurl result, and videoinfo result are included in the report.
+3 −3
Original line number Diff line number Diff line
@@ -8,9 +8,9 @@ from switch import Switch
from .types import YouTubeService, methods, experiment_base_url
from yarl import URL

async def submit_experiment(session: aiohttp.ClientSession, experiment_name: str, video_id: str):
async def submit_experiment(session: aiohttp.ClientSession, experiment_name: str, video_id: str, **report):
    if experiment_base_url:
        report = {
        report |= {
            "experiment": experiment_name,
            "id": video_id,
        }
@@ -78,7 +78,7 @@ class WaybackMachine(YouTubeService):
            if videoinfo_archived:
                archived = True
        if fakeurl_archived != videoinfo_archived:
            await submit_experiment(session, "wb-index-weirdness", id)
            await submit_experiment(session, "wb-index-weirdness", id, fakeurl=fakeurl_archived, videoinfo=videoinfo_archived)
            if videoinfo_archived:
                # TODO: better sorting system; right now while this is
                # an edge case I'm not going to bother, but if it ever is the default