I am trying to figure out a way I can get email or tel from craigslists using python.
I have used python-craigslist to get the post but there is nothing I am able to find regarding emails or other contact info
I tried this:
import requests
url = "https://chandigarh.craigslist.org/reply/ixc/hum/7220389776/mailto"
head = {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "en-GB,en-US;q=0.9,en;q=0.8",
"Connection": "keep-alive",
"Content-Length": "344",
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"DNT": "1",
"Host": "chandigarh.craigslist.org",
"Origin": "https://chandigarh.craigslist.org",
"Referer": "https://chandigarh.craigslist.org/hum/d/hr-outsourcing-company-in-mohali/7220389776.html",
"Sec-Fetch-Dest": "empty",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Site": "same-origin",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36",
"X-Requested-With": "XMLHttpRequest"
}
post_data = {"n": "U2FsdGVkX184MDg3MTgwOF5nEvY336v771unnxU7b9fc52-DzxhmmxcCYwQ6uylAsvUK2atZ1Ot3zWsSF4ukqvM9BMFMnNA_L00i0jQ5DhiZkfobQq1avkovyPJ3IcQbWM4327VdEQUipMzU6XfOXn5xsLqQ9Tt-L1qJdM55e2Ac11nzeaFCRV7HgpYmmIdrjpESKZpp0dhTh2p5d826f9CSBa4ldNRg0pLswm5P3JXaYGTe4Z7Fe5NB1Jfs3-CBWFdy2ZzqIA345q_YfXUatIMoq1TwN3lc_ee8rKnLKJmQwPHPpLoQHRP9aioeMOBv17okylBLm8uhduZ6HawCRg"}
resp = requests.post(url, headers=head,data= post_data)
print(resp.text)
but no response

For scraping Craigslist, use the pyquery Python package: https://pypi.python.org/pypi/pyquery
For a regex for email addresses / phone numbers, see the examples on this page: http://www.regular-expressions.info/
For storing the email addresses you can just output to csv. You can read on how to do it there: https://docs.python.org/2/library/csv.html
If you wouldd like to use this emails and send messages to them you might want to check this addon: https://addons.mozilla.org/en-US/thunderbird/addon/mail-merge/
Also I advise you to stay on the bright side and read more there: http://en.wikipedia.org/wiki/Morality