Skip to content
This repository has been archived by the owner on Jul 14, 2020. It is now read-only.

Python version and is it functional ? #2

Closed
dfaingold opened this issue Apr 2, 2016 · 3 comments
Closed

Python version and is it functional ? #2

dfaingold opened this issue Apr 2, 2016 · 3 comments

Comments

@dfaingold
Copy link

Hi, what version of Python are you using ? May be my bad as I use R and I'm new to Python but in version 3.5.1 on windows I had to reformat the prints adding parenthesis, remove urllib2, change the Exception format as e: and then I run into
RESTART: C:\Users\Daniel\Documents\R\facebook-page-post-scraper-master\get_fb_posts_fb_page.py
Traceback (most recent call last):
File "C:\Users\Daniel\Documents\R\facebook-page-post-scraper-master\get_fb_posts_fb_page.py", line 111, in
scrapeFacebookPageFeedStatus(page_id, access_token)
File "C:\Users\Daniel\Documents\R\facebook-page-post-scraper-master\get_fb_posts_fb_page.py", line 81, in scrapeFacebookPageFeedStatus
"status_published", "num_likes", "num_comments", "num_shares"])
TypeError: a bytes-like object is required, not 'str'

My version:
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32

Wondering what I am doing wrong or is it that Faceboock broke this functionality again

@dfaingold
Copy link
Author

Issue closed, converted into Python 3.

@Flimm
Copy link

Flimm commented Jun 17, 2016

I'm confused. The README.md says it's supposed to be run in Python 2.

@minimaxir
Copy link
Owner

It's not a complicated script (no external dependencies), so it can theoretically be converted to Python 3 easily. (e.g. convert urllib2 to requests).

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

No branches or pull requests

3 participants