-1

I get a syntax error for the following code:

import spynner

browser = spynner.Browser( (['User-Agent', 'foobar')]) 

How can I change the default user agent in the python spynner module?

greole
  • 4,523
  • 5
  • 29
  • 49
guiboy
  • 101
  • 1
  • 10

1 Answers1

1

You get syntax error because of unmatched brackets. To change default user agent you can use user_agent argument. Here's an example: https://github.com/makinacorpus/spynner/blob/c205db628ac41c46f3df07345f547f0fa8ee25ff/examples/proxy.py#L22

irqed
  • 649
  • 4
  • 15