Skip to content

Commit

Permalink
[apps/browser] docker headless
Browse files Browse the repository at this point in the history
  • Loading branch information
javierluraschi committed Sep 11, 2024
1 parent b0bdfa7 commit 4e56db7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/browser/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ def wrap_in_async_function(code):

async def main():
custom_user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"
browser = await pyppeteer.launch()
browser = await pyppeteer.launch(
headless=True,
args=['--no-sandbox', '--disable-setuid-sandbox']
)

page = await browser.newPage()

await page.setUserAgent(custom_user_agent)
Expand Down

0 comments on commit 4e56db7

Please sign in to comment.