4 ms·
Alas, I couldn't get this working. Never used Python before so I'm unsure how to fix it, but it seems like something breaks when the title is undefined. Was ex
by firloop 10y ago
Alas, I couldn't get this working. Never used Python before so I'm unsure how to fix it, but it seems like something breaks when the title is undefined.
Was excited to as well, was going to write a script that fed this into Pinboard. Maybe I'll code up my own upvoted item scraper later.
Enter your HN account details:
Username: firloop
Password:
Logging in...
Logged in successfully.
Error getting data for page 1
Traceback (most recent call last):
File "export_links.py", line 137, in <module>
main()
File "export_links.py", line 113, in main
if len(tree_title) < 61:
UnboundLocalError: local variable 'tree_title' referenced before assignment
- amjd 10y agoHi, I just fixed that error. Can you clone the latest code and try again? If you still have any problems, please create an issue on Github. :)
- firloop 10y agoNo dice (same error as commenter above).
- raggingfox 10y agocan you do pip install cssselect and try?