-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathother_scraping.py
52 lines (40 loc) · 1.97 KB
/
other_scraping.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from newspaper import Article
import os
timothy_may = ["http://nakamotoinstitute.org/crypto-anarchist-manifesto/",
"http://nakamotoinstitute.org/virtual-communities/"]
nick_szabo = ["http://nakamotoinstitute.org/formalizing-securing-relationships/",
"http://nakamotoinstitute.org/contract-language/",
"http://nakamotoinstitute.org/secure-property-titles/",
"http://nakamotoinstitute.org/trusted-third-parties/",
"http://nakamotoinstitute.org/contracts-with-bearer/",
"http://nakamotoinstitute.org/the-god-protocols/",
"http://nakamotoinstitute.org/multinational-small-business/",
"http://nakamotoinstitute.org/shelling-out/",
"http://nakamotoinstitute.org/bit-gold/",
"http://nakamotoinstitute.org/advances-in-distributed-security/",
"http://nakamotoinstitute.org/the-playdough-protocols/",
"http://nakamotoinstitute.org/measuring-value/",
"http://nakamotoinstitute.org/intrapolynomial-cryptography/",
"http://nakamotoinstitute.org/smart-contracts-glossary/",
"http://nakamotoinstitute.org/scarce-objects/",
"http://nakamotoinstitute.org/negative-reputation/"]
ian_grigg = ["http://nakamotoinstitute.org/the-ricardian-contract/",
"http://nakamotoinstitute.org/triple-entry-accounting/"]
hal_finney = ["http://nakamotoinstitute.org/bitcoin-and-me/",
"http://nakamotoinstitute.org/for-pay-remailers/",
"http://nakamotoinstitute.org/politics-vs-technology/",
"http://nakamotoinstitute.org/pgp-web-of-trust-misconceptions/",
"http://nakamotoinstitute.org/rpow/",
"http://nakamotoinstitute.org/digital-cash-and-privacy/"]
author = [timothy_may, nick_szabo, ian_grigg, hal_finney]
author_name = ["timothy_may", "nick_szabo", "ian_grigg", "hal_finney"]
full = os.getcwd() + '/other_data/'
for i in range(len(author)):
for j in range(len(author[i])):
article = Article(author[i][j])
article.download()
article.parse()
with open(full + '{}-{}.txt'.format(author_name[i],j), 'w') as f:
f.write(article.text)