Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Metacritic design breaks script #23

Open
TuTAH1 opened this issue Sep 14, 2023 · 4 comments
Open

New Metacritic design breaks script #23

TuTAH1 opened this issue Sep 14, 2023 · 4 comments
Assignees
Labels

Comments

@TuTAH1
Copy link
Contributor

TuTAH1 commented Sep 14, 2023

The simmilar issue as #8 is now happening (Steam) if the game is found
examples:
https://store.steampowered.com/app/1241510/The_Test/
https://store.steampowered.com/app/1092790/Inscryption/
image

The window doesn't displays at all if the game weren't found
examples:
https://store.steampowered.com/app/285500/Hard_Truck_Apocalypse__Ex_Machina/
https://store.steampowered.com/app/1171340/_/

@cvzi
Copy link
Owner

cvzi commented Sep 15, 2023

Yes I see the same problem. It happens because metacritic has a new design, and they now longer offer the compact badges that the script used to show.
I pushed a temporary fix that should at least prevent it from getting so big.

But the script needs some more changes. Maybe it could show the new design from metacritic:
This one from the right-hand side of the page:
Screenshot 2023-09-15 092323

or the more detailed one:
Screenshot 2023-09-15 092252

@cvzi cvzi added the bug label Sep 15, 2023
@cvzi cvzi changed the title [Steam] if script finds the MC page, the MC page opens in half of screen New Metacritic design breaks script Sep 15, 2023
@cvzi cvzi self-assigned this Sep 15, 2023
@cvzi
Copy link
Owner

cvzi commented Sep 18, 2023

The new design works for the critics and user scores now.

Unfortunately the search function is also broken, and there is no simple fix.

At the moment the script can only find exact matches:
For example:
https://store.steampowered.com/app/1241510/The_Test/ -> https://www.metacritic.com/game/the-test/

But if the names don't match perfectly, it doesn't work:
Example:
https://store.steampowered.com/app/285500/Hard_Truck_Apocalypse__Ex_Machina/
won't find
https://www.metacritic.com/game/hard-truck-apocalypse/

@cvzi
Copy link
Owner

cvzi commented Sep 18, 2023

Note:

metacritic.com uses this API for searching:
https://fandom-prod.apigee.net/v1/xapi/finder/metacritic/search/my+query/web?apiKey=1MOZgmNFxvmljaQR1X9KAij9Mo4xAY3u&componentName=search-tabs&componentDisplayName=Search+Page+Tab+Filters&componentType=FilterConfig&mcoTypeId=2&offset=0&limit=30

(The url can be found in the HTML on the search page i.e. https://www.metacritic.com/search/my+query/?page=1&category=2)

Resulting in:

{
    "data":
    {
        "id": "c9eef2b4-a1a8-4dff-a175-2b4c603865c0",
        "totalResults": 389,
        "items":
        [
            {
                "id": 2000553938,
                "type": "movie",
                "typeId": 2,
                "title": "My Donkey, My Lover & I",
                "slug": "my-donkey-my-lover-i",
                "images":
                [
                    {"id":"2-b64fe5c0821f616c6cb9b3fa1dfb3439","filename":"2-b64fe5c0821f616c6cb9b3fa1dfb3439.jpg","dateCreated":{"date":null,"timezone":null},"alt":null,"credits":null,"path":null,"cropGravity":null,"crop":null,"caption":null,"typeName":"cardImage","imageUrl":null,"width":1733,"height":2560,"sType":null,"bucketType":"catalog","bucketPath":"/provider/2/2/2-b64fe5c0821f616c6cb9b3fa1dfb3439.jpg","mediaType":null,"provider":"2"}
                ],
                "criticScoreSummary":
                {
                    "url": "/movie/my-donkey-my-lover-i/critic-reviews/",
                    "score": 72
                },
                "rating": "",
                "releaseDate": "2022-07-22",
                "premiereYear": 2020,
                "genres":
                [
                    {"id":null,"name":"Adventure"},
                    {"id":null,"name":"Comedy"},
                    {"id":null,"name":"Romance"}
                ],
                "platforms": [],
                "seasonCount": 0,
                "description": "Antoinette, a schoolteacher, is looking forward to her long planned summer holiday with her married lover Vladimir, the father of one of her pupils. When she learns that Vladimir has to cancel because his wife organized a surprise hiking vacation, Antoinette decides to follow their tracks, accompanied by a protective donkey named Patrick.",
                "duration": 96,
                "mustSee": false,
                "mustWatch": false,
                "mustPlay": false
            },
            {
                "id": 2000556223,
                "type": "movie",
                "typeId": 2,
                "title": "Glass Onion: A Knives Out Mystery",
                "slug": "glass-onion-a-knives-out-mystery",
                "images":
                [
                    {"id":"2-af62f8f89de6dde951218e50ec23da2d","filename":"2-af62f8f89de6dde951218e50ec23da2d.jpg","dateCreated":{"date":null,"timezone":null},"alt":null,"credits":null,"path":null,"cropGravity":null,"crop":null,"caption":null,"typeName":"cardImage","imageUrl":null,"width":826,"height":1239,"sType":null,"bucketType":"catalog","bucketPath":"/provider/2/2/2-af62f8f89de6dde951218e50ec23da2d.jpg","mediaType":null,"provider":"2"}
                ],
                "criticScoreSummary":
                {
                    "url": "/movie/glass-onion-a-knives-out-mystery/critic-reviews/",
                    "score": 81
                },
                "rating": "PG-13",
                "releaseDate": "2022-11-23",
                "premiereYear": 2022,
                "genres":
                [
                    {"id":null,"name":"Comedy"},
                    {"id":null,"name":"Crime"},
                    {"id":null,"name":"Drama"},
                    {"id":null,"name":"Mystery"},
                    {"id":null,"name":"Thriller"}
                ],
                "platforms": [],
                "seasonCount": 0,
                "description": "In Rian Johnson's Knives Out follow-up, detective Benoit Blanc travels to Greece to peel back the layers of a mystery involving a new cast of suspects.",
                "duration": 139,
                "mustSee": true,
                "mustWatch": true,
                "mustPlay": true
            },
            {
                "id": 2000517947,
                "type": "movie",
                "typeId": 2,
                "title": "My Country, My Country",
                "slug": "my-country-my-country",
                "images":
                [
                    {"id":"2-a91bf215ceb05fc6380f68b40d619f60","filename":"2-a91bf215ceb05fc6380f68b40d619f60.jpg","dateCreated":{"date":null,"timezone":null},"alt":null,"credits":null,"path":null,"cropGravity":null,"crop":null,"caption":null,"typeName":"cardImage","imageUrl":null,"width":337,"height":500,"sType":null,"bucketType":"catalog","bucketPath":"/provider/2/13/2-a91bf215ceb05fc6380f68b40d619f60.jpg","mediaType":null,"provider":"2"}
                ],
                "criticScoreSummary":
                {
                    "url": "/movie/my-country-my-country/critic-reviews/",
                    "score": 74
                },
                "rating": "Not Rated",
                "releaseDate": "2006-08-04",
                "premiereYear": 2006,
                "genres":
                [
                    {"id":null,"name":"Documentary"}
                ],
                "platforms": [],
                "seasonCount": 0,
                "description": "Working alone in Iraq over eight months, director/cinematographer Laura Poitras creates an extraordinarily intimate portrait of Iraqis living under U.S. occupation.  (Zeitgeist Films)",
                "duration": 90,
                "mustSee": false,
                "mustWatch": false,
                "mustPlay": false
            },
            {
                "id": 2000554687,
                "type": "movie",
                "typeId": 2,
                "title": "Drive My Car",
                "slug": "drive-my-car",
                "images":
                [
                    {"id":"2-e038bfdf7e303cb9c5c783a7c9aec53d","filename":"2-e038bfdf7e303cb9c5c783a7c9aec53d.jpg","dateCreated":{"date":null,"timezone":null},"alt":null,"credits":null,"path":null,"cropGravity":null,"crop":null,"caption":null,"typeName":"cardImage","imageUrl":null,"width":1693,"height":2500,"sType":null,"bucketType":"catalog","bucketPath":"/provider/2/2/2-e038bfdf7e303cb9c5c783a7c9aec53d.jpg","mediaType":null,"provider":"2"}
                ],
                "criticScoreSummary":
                {
                    "url": "/movie/drive-my-car/critic-reviews/",
                    "score": 91
                },
                "rating": "Unrated",
                "releaseDate": "2021-11-24",
                "premiereYear": 2021,
                "genres":
                [
                    {"id":null,"name":"Drama"}
                ],
                "platforms": [],
                "seasonCount": 0,
                "description": "Two years after his wife’s unexpected death, Yusuke Kafuku (Hidetoshi Nishijima), a renowned stage actor and director, receives an offer to direct a production of Uncle Vanya at a theater festival in Hiroshima. There, he meets Misaki Watari (Toko Miura), a taciturn young woman assigned by the festival to chauffeur him in his beloved red Saab 900. As the production’s premiere approaches, tensions mount amongst the cast and crew, not least between Yusuke and Koji Takatsuki, a handsome TV star who shares an unwelcome connection to Yusuke’s late wife. Forced to confront painful truths raised from his past, Yusuke begins - with the help of his driver – to face the haunting mysteries his wife left behind.  Adapted from Haruki Murakami’s short story. [Janus Films]\r\n",
                "duration": 179,
                "mustSee": true,
                "mustWatch": true,
                "mustPlay": true
            },
            {
                "id": 2000556703,
                "type": "movie",
                "typeId": 2,
                "title": "Selena Gomez: My Mind & Me",
                "slug": "selena-gomez-my-mind-me",
                "images":
                [
                    {"id":"2-3b5083ed87400ef9cad89494a7620872","filename":"2-3b5083ed87400ef9cad89494a7620872.jpg","dateCreated":{"date":null,"timezone":null},"alt":null,"credits":null,"path":null,"cropGravity":null,"crop":null,"caption":null,"typeName":"cardImage","imageUrl":null,"width":828,"height":1228,"sType":null,"bucketType":"catalog","bucketPath":"/provider/2/2/2-3b5083ed87400ef9cad89494a7620872.jpg","mediaType":null,"provider":"2"}
                ],
                "criticScoreSummary":
                {
                    "url": "/movie/selena-gomez-my-mind-me/critic-reviews/",
                    "score": 68
                },
                "rating": "R",
                "releaseDate": "2022-11-04",
                "premiereYear": 2022,
                "genres":
                [
                    {"id":null,"name":"Documentary"},
                    {"id":null,"name":"Biography"}
                ],
                "platforms": [],
                "seasonCount": 0,
                "description": "After years in the limelight, Selena Gomez achieves unimaginable stardom. But just as she reaches a new peak, an unexpected turn pulls her into darkness. This uniquely raw and intimate documentary spans her six-year journey into a new light.",
                "duration": 95,
                "mustSee": false,
                "mustWatch": false,
                "mustPlay": false
            }
        ]
    },
    "links":
    {
        "self":
        {
            "href": "https://fandom-prod.apigee.net/v1/xapi/finder/metacritic/search/my+query/web?apiKey=1MOZgmNFxvmljaQR1X9KAij9Mo4xAY3u&componentName=search-tabs&componentDisplayName=Search%20Page%20Tab%20Filters&componentType=FilterConfig&mcoTypeId=2&offset=0&limit=5",
            "meta":
            {
                "pageNum": 1,
                "count": 5
            }
        },
        "prev":
        {
            "href": null,
            "meta": null
        },
        "next":
        {
            "href": "https://fandom-prod.apigee.net/v1/xapi/finder/metacritic/search/my+query/web?apiKey=1MOZgmNFxvmljaQR1X9KAij9Mo4xAY3u&componentName=search-tabs&componentDisplayName=Search%20Page%20Tab%20Filters&componentType=FilterConfig&mcoTypeId=2&offset=5&limit=5",
            "meta":
            {
                "pageNum": 2,
                "count": 5
            }
        },
        "first":
        {
            "href": "https://fandom-prod.apigee.net/v1/xapi/finder/metacritic/search/my+query/web?apiKey=1MOZgmNFxvmljaQR1X9KAij9Mo4xAY3u&componentName=search-tabs&componentDisplayName=Search%20Page%20Tab%20Filters&componentType=FilterConfig&mcoTypeId=2&offset=0&limit=5",
            "meta":
            {
                "pageNum": 1,
                "count": 5
            }
        },
        "last":
        {
            "href": "https://fandom-prod.apigee.net/v1/xapi/finder/metacritic/search/my+query/web?apiKey=1MOZgmNFxvmljaQR1X9KAij9Mo4xAY3u&componentName=search-tabs&componentDisplayName=Search%20Page%20Tab%20Filters&componentType=FilterConfig&mcoTypeId=2&offset=385&limit=5",
            "meta":
            {
                "pageNum": 78,
                "count": 4
            }
        },
        "sortOptions":
        [
            {
                "label": "Relevance",
                "href": "https://fandom-prod.apigee.net/v1/xapi/finder/metacritic/search/my+query/web?apiKey=1MOZgmNFxvmljaQR1X9KAij9Mo4xAY3u&componentName=search-tabs&componentDisplayName=Search%20Page%20Tab%20Filters&componentType=FilterConfig&mcoTypeId=2&offset=0&limit=5&sortBy="
            },
            {
                "label": "Popularity",
                "href": "https://fandom-prod.apigee.net/v1/xapi/finder/metacritic/search/my+query/web?apiKey=1MOZgmNFxvmljaQR1X9KAij9Mo4xAY3u&componentName=search-tabs&componentDisplayName=Search%20Page%20Tab%20Filters&componentType=FilterConfig&mcoTypeId=2&offset=0&limit=5&sortBy=REVIEW_COUNT&sortDirection=DESC"
            },
            {
                "label": "Metascore",
                "href": "https://fandom-prod.apigee.net/v1/xapi/finder/metacritic/search/my+query/web?apiKey=1MOZgmNFxvmljaQR1X9KAij9Mo4xAY3u&componentName=search-tabs&componentDisplayName=Search%20Page%20Tab%20Filters&componentType=FilterConfig&mcoTypeId=2&offset=0&limit=5&sortBy=META_SCORE&sortDirection=DESC"
            },
            {
                "label": "Newest Release",
                "href": "https://fandom-prod.apigee.net/v1/xapi/finder/metacritic/search/my+query/web?apiKey=1MOZgmNFxvmljaQR1X9KAij9Mo4xAY3u&componentName=search-tabs&componentDisplayName=Search%20Page%20Tab%20Filters&componentType=FilterConfig&mcoTypeId=2&offset=0&limit=5&sortBy=RELEASE_YEAR&sortDirection=DESC"
            }
        ]
    },
    "meta":
    {
        "componentName": "search-tabs",
        "componentDisplayName": "Search Page Tab Filters",
        "componentType": "FilterConfig"
    }
}

cvzi added a commit that referenced this issue Sep 22, 2023
@cvzi
Copy link
Owner

cvzi commented Sep 23, 2023

The search seems to work well now, except for music album, they don't appear in the search at all.

Apparently music has not been integrated into the new website design yet:
From https://metacritichelp.zendesk.com/hc/en-us/articles/17438230182423-Why-Can-t-I-Leave-a-User-Review-Rating-in-the-Music-Section-

The Metacritic team is in the process of redesigning the Music section, and it will soon operate like the other three sections (Movies, Games, TV) . During this interim period, our users will not be able to rate or review albums. However, we will continue to populate those pages with critic reviews and Metascores. Your ability to rate and review albums will return. We appreciate your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants