Title: Are you responsible for the legality of the code you provide to every client?
Tags: freelance-websites;legal;web-development
Question: I've been really interested in data scraping and headless browsing and was ready to put some samples in my portfolio for future clients ... after doing some research on this topic I found that there's tons of lawsuit against scrappers (the most famous one is Facebook lawsuit against Power.com
my question is : as a freelancer developer should I be worried about the legality of every code I provide ? Should I demand signing some kind of contract whenever I sell the simplest code ? Is it enough stating that I'm not responsible for the usage of this code by the client ?


Here is another answer: I am not a lawyer but the person or organisation that runs your code would be more likely to be subject to legal scrutiny than you as the author of the code.
For example, I can freely download ethical hacking / penetration testing tools to test the security of my own website or server etc and it's unlikely anyone would have any legal concerns. If I were to use the tool to hack into a competitor website or server, this would no doubt be a different story.
It's reasonable to assume that a data scraper could be used ethically so I don't see how you could be sued for writing or selling this type of software. For example, I might use a data scraping tool to collect data from commercial websites for statistical analysis.
In the Facebook vs Power Ventures example you link to, the complaint was about copyright violation because the scraped data was republished without permission.

Here is another answer: Actually, contracts most often work the other way around: The client insisting that you ensure the code is legal and lives up to standard industry practices.
As a freelancer, you often deal with clients with very little knowledge or interest in IT.
Contractually, you could have them assume the legal risks. Personally, I always view myself as the client's advisor and would therefore assume this risk myself as I - and not the client - should have the expertise in this area.
If you want a long term relationship with clients, getting them to assume a risk they hardly understand, is not the way forward.

Here is another answer: I wouldn't produce anything illegal, but the responsible would be the owner and the owner (your client) would blame the author as he/she may not know what you did, so yes, you are responsible of what you do and even if you provide a false ID, it's not difficult to identify you, so I would avoid those kind of issues.

{'source': 'StackExchangeDataset', 'subset': 'freelancing.stackexchange.com', 'metadata': {'AnswerCount': 3, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2016:00:04/28/16', 'FavoriteCount': 1.0, 'PostTypeId': 1, 'Tags': '<freelance-websites><legal><web-development>', 'Title': 'Are you responsible for the legality of the code you provide to every client?', 'ViewCount': 189, 'id': 4462, 'user_AboutMe': None, 'user_AccountId': 6185943.0, 'user_DisplayName': 'Pro Haitham', 'user_Reputation': 31.0, 'user_Views': 0.0, 'user_id': 12247.0}}