facebook_page_scraper icon indicating copy to clipboard operation
facebook_page_scraper copied to clipboard

TypeError: __init__() got an unexpected keyword argument 'proxy'

Open gerickt opened this issue 2 years ago • 7 comments

Hi guys, im trying to work with a proxy. And i get this error: TypeError: __init__() got an unexpected keyword argument 'proxy'

my setting:

page_name = "FacebookAI"
posts_count = 25
browser = "chrome"
proxy = "proxyIP:9999" #if proxy requires authentication then user:password@IP:PORT
facebook_ai = Facebook_scraper(page_name,posts_count,browser,proxy=proxy)

gerickt avatar Oct 25 '21 17:10 gerickt

Hello, I pasted exactly the same code and it is working. Can you provide more details? So, I can look into this properly. Like What version of Python, Environment you're on.

shaikhsajid1111 avatar Oct 27 '21 06:10 shaikhsajid1111

Hi, thanks for answer.

Im using Anconda with python 3.6.10

if I remove argument 'proxy=proxy' works... If I remove parameter '=proxy' giveme this error

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-34-e73d97c6f82e> in <module>
      3 browser = "chrome"
      4 proxy = "ip.io:9999" #if proxy requires authentication then user:password@IP:PORT
----> 5 facebook_ai = Facebook_scraper(page_name,posts_count,browser,proxy)

TypeError: __init__() takes from 2 to 4 positional arguments but 5 were given

gerickt avatar Oct 27 '21 19:10 gerickt

You're on version 0.1.9. Right?

shaikhsajid1111 avatar Oct 28 '21 12:10 shaikhsajid1111

yes im in bdist.macosx-10.9-x86_64

gerickt avatar Oct 28 '21 15:10 gerickt

Sorry, I do not understand that version system because I usually work with linux and windows. I just meant to ask if this library is on the latest version 0.1.9, because proxy feature is available in the latest version only and you're facing similar issue.

shaikhsajid1111 avatar Oct 28 '21 16:10 shaikhsajid1111

im using facebook_page_scraper-0.1.9-py3.8.egg on a macos

gerickt avatar Oct 28 '21 17:10 gerickt

Okay, you installed it from the source. This file is the one you should be looking on at line 43 the constructor should have the proxy, I'm currently unable to figure out what is really happening as I can't create the same issue on local machine. It may take time for me to resolve this issue, I apologise for that.

shaikhsajid1111 avatar Oct 28 '21 17:10 shaikhsajid1111