Skip to content

Commit acdd3ed

Browse files
author
Mike Kozicki
authored
Merge pull request #641 from HTTPArchive/lighthouse
Fixed the lighthouse user agent string
2 parents 465638a + 1fc2900 commit acdd3ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/devtools_browser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ def run_lighthouse_test(self, task):
874874
command.extend(['--screenEmulation.disabled'])
875875
if 'user_agent_string' in self.job:
876876
sanitized_user_agent = re.sub(r'[^a-zA-Z0-9_\-.;:/()\[\] ]+', '', self.job['user_agent_string'])
877-
command.append('--chrome-flags="--user-agent=\'{0}\'"'.format(sanitized_user_agent))
877+
command.extend(['--emulatedUserAgent', "'" + sanitized_user_agent + "'"])
878878
if len(task['block']):
879879
for pattern in task['block']:
880880
pattern = "'" + pattern.replace("'", "'\\''") + "'"

0 commit comments

Comments
 (0)