Closed ShanghaoLi0913 closed 2 years ago
@lshowo Hi, have a look at this link. If you something wrong with this package, please change your IP to check if Facebook blocks your IP. https://github.com/TLYu0419/facebook_crawler/blob/main/sample/FansPages.ipynb
Hi any update in this problem,I also got it too
maybe add some settings in request-header would be better ?
IndexError Traceback (most recent call last) /opt/homebrew/lib/python3.9/site-packages/facebook_crawler.py in Crawl_PagePosts(pageurl, until_date) 27 try: ---> 28 pageid = re.findall('page_id=(.*?)"',resp.text)[0] 29 except:
IndexError: list index out of range
During handling of the above exception, another exception occurred:
IndexError Traceback (most recent call last) /var/folders/5t/0_sy0vtj6qq8t3369f_ymtrh0000gn/T/ipykernel_81480/4005812947.py in
1 import facebook_crawler
2 pageurl= 'https://www.facebook.com/MaYingjeou'
----> 3 facebook_crawler.Crawl_PagePosts(pageurl=pageurl, until_date='2016-01-01')
/opt/homebrew/lib/python3.9/site-packages/facebook_crawler.py in Crawl_PagePosts(pageurl, until_date) 28 pageid = re.findall('page_id=(.?)"',resp.text)[0] 29 except: ---> 30 pageid = re.findall('delegate_page":{"id":"(.?)"},', resp.text)[0] 31 32 # request date and break loop when reach the goal
IndexError: list index out of range