tlyu0419 / facebook_crawler

MIT License
277 stars 68 forks source link

IndexError: list index out of range #6

Closed May81273 closed 3 years ago

May81273 commented 3 years ago

I got the same problem"IndexError: list index out of range". pageurl is"https://www.facebook.com/josepereiracoutinho.macau" The resp of this url is different from other url, There is no page_id in resp so when "pageid = re.findall('page_id=(.*?)"',resp.text)[0]" runs, page_id try to get list[0[ from a empty list. Could you solve this qusetion? Thanks,

May81273 commented 3 years ago

image But in elements of website, I can find page_id. I don't know why there is no page_id in resp.text.

May81273 commented 3 years ago

image I use this page_id, then I get result sucessfully.

tlyu0419 commented 3 years ago

Hi @May81273, It's good to hear you had solved this problem. If you like this project, please give me support. Either donate, star or share are good for me, tks!