Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get any data #88

Open
eric09230 opened this issue Nov 11, 2023 · 1 comment
Open

Can't get any data #88

eric09230 opened this issue Nov 11, 2023 · 1 comment

Comments

@eric09230
Copy link

Dear @shaikhsajid1111

I am encountering an issue when running the following code: no data is returned. Could you please help me understand why this is happening?

#import Facebook_scraper class from facebook_page_scraper
from facebook_page_scraper import Facebook_scraper

#instantiate the Facebook_scraper class
page_name = "TaiwanAirTkt"
posts_count = 10
browser = "firefox"
proxy = "IP:PORT" # if proxy requires authentication then user:password@IP:PORT
timeout = 600 # 600 seconds
headless = False
meta_ai = Facebook_scraper(page_name, posts_count, browser, proxy=proxy, timeout=timeout, headless=headless)

#call the scrap_to_json() method
json_data = meta_ai.scrap_to_json()
print(json_data)

To elaborate, I can see that the browser correctly opens and navigates to https://www.facebook.com/TaiwanAirTkt. The page keeps scrolling down, but the terminal shows:

(myenv) C:\Users\python\facebook_page_scraper-3.0.0-mod>python test2.py
Scraping Facebook Page Name: TaiwanAirTkt
[WDM] - Driver [C:\Users\eric9.wdm\drivers\geckodriver\win64\v0.33.0\geckodriver.exe] found in cache
error at find_elements method : invalid literal for int() with base 10: ''
error at find_elements method : invalid literal for int() with base 10: ''
It seems like the webpage elements are not being correctly captured. Could you please assist in fixing this issue?

Thank you for your help.

@asakous
Copy link

asakous commented Mar 13, 2024

I just tested . work fine on python 3.12 .
there are two steps need to be taken in order to run script correctly.
1: upgrade webdriver_manager.
2: unable auto close facebook login popup. [aria-label="Close"] need change to [aria-label="關閉"] .If you are using traditional chinese.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants