bibanon / BASC-py4chan

Python wrapper for 4chan API. The BA's vastly improved fork of Edgeworth's original.
http://basc-py4chan.readthedocs.org/en/latest/index.html
Do What The F*ck You Want To Public License
55 stars 13 forks source link

Fixes for #10 and #11 #12

Closed irlittz closed 9 years ago

irlittz commented 9 years ago

Fixes #10 and #11.

DanielOaks commented 9 years ago

Looks like it should be fine, you've tested this and it all works?

irlittz commented 9 years ago

I did really simple tests with get_threads and different pages which all worked. Fetching board metadata through any of the Board's properties works too. You might want to look at this, it's how I determine if SSL should be used or not. This is a problem when functions outside of the Board class attempt to use _fetch_board_metadata, you end up having to create a dummy URL generator instance without a valid board name (which does work).

DanielOaks commented 9 years ago

Cool, I've tested with BASC-Archiver and it all seems to work fine.

Thanks a bunch for the fixes, I've pulled this in (with some rebasing to avoid messy merge commits), so your code's in master now! I'll try to push an update to pypi with it tonight.

irlittz commented 9 years ago

Actually I just noticed. I'm sorry, I wasn't entirely clear on why you did something in the previous code. You want to re-add the line: if not _metadata: here, or it'll fetch the boards metadata each time someone is accessing a property.