- 'https://www.discovery.com/anonymous', display_id, query={
- 'authLink': update_url_query(
- 'https://login.discovery.com/v1/oauth2/authorize', {
- 'client_id': react_data['application']['apiClientId'],
- 'redirect_uri': 'https://fusion.ddmcdn.com/app/mercury-sdk/180/redirectHandler.html',
- 'response_type': 'anonymous',
- 'state': 'nonce,' + ''.join([random.choice(string.ascii_letters) for _ in range(32)]),
- })
+ 'https://www.%s.com/anonymous' % site, display_id, query={
+ 'authRel': 'authorization',
+ 'client_id': try_get(
+ react_data, lambda x: x['application']['apiClientId'],
+ compat_str) or '3020a40c2356a645b4b4',
+ 'nonce': ''.join([random.choice(string.ascii_letters) for _ in range(32)]),
+ 'redirectUri': 'https://fusion.ddmcdn.com/app/mercury-sdk/180/redirectHandler.html?https://www.%s.com' % site,