kevinzg / facebook-scraper

Scrape Facebook public pages without an API key
MIT License
2.45k stars 633 forks source link

Method get_page_info shouldn't use mobile base url #888

Open EricCat opened 2 years ago

EricCat commented 2 years ago

/{page}/about seems to only works for the W3 base URL, not the mobile base URL. Line:623.

def get_page_info(self, page, **kwargs) -> Profile:
        result = {}
        desc = None

        try:
            about_url = f'/{page}/about/'
            logger.debug(f"Requesting page from: {about_url}")
            resp = self.get(about_url)
            ........

While the get function will use the mobile base URL as default. Line:864

def get(self, url, **kwargs):
        try:
            self.request_count += 1
            url = str(url)
            if not url.startswith("http"):
                url = utils.urljoin(FB_MOBILE_BASE_URL, url)