manzked commited on
Commit
d57cb53
·
verified ·
1 Parent(s): ff4423a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +100 -1
README.md CHANGED
@@ -6,4 +6,103 @@ tags:
6
  pretty_name: 1m huffpost news article links
7
  size_categories:
8
  - 100K<n<1M
9
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  pretty_name: 1m huffpost news article links
7
  size_categories:
8
  - 100K<n<1M
9
+ ---
10
+ The dataset consists of >1m links to huffpost news articles. They have been crawled for an educational approach to learn how content could be gathered through reading the websites sitemap(s).
11
+
12
+ The code can be found here [Link](https://github.com/manzke/huffpost-crawler/)
13
+
14
+ # huffpost-crawler
15
+ educational - how to use sitemap.xml for crawling a website (huffpost.com - could be any)
16
+
17
+ Every public website has (or should have) a sitemap.xml. The sitemap.xml allows robots like Google to find links, which should be crawled.
18
+
19
+ In the most cases the sitemaps can be found with just adding a /sitemap.xml to the domain or in bigger sites, check the robots.txt (ex. https://www.huffpost.com/robots.txt)
20
+
21
+ The robots.txt tells you where to find the sitemap.xml and if a robot is allowed to follow the links. A site can also manage to not get indexed, when it has the metatags for nofollow, noindex.
22
+
23
+ Your crawler should respect them to not read old content, privacy reasons, etc.
24
+
25
+ What does our crawler do?
26
+ - it loads the robots.txt
27
+ - detects the sitemaps
28
+ - loads every sitemap
29
+ - gets the urls from each sitemap
30
+ - which can be either another sitemap or a url
31
+ - we are loading each sitemap
32
+ - storing every url which is an entry as well as the skipped ones
33
+
34
+ This led to 1,121,569 unique links for new entries.
35
+
36
+ ## robots.txt
37
+
38
+ A lot of LLM models have been trained on public data. To forbit it, pages has added
39
+
40
+ User-agent: GPTBot
41
+ Disallow: /
42
+
43
+ This tells the GPTBot to not crawl the site. Let's hope it complies with it.
44
+
45
+ Also take the Crawl-delay into account, which tells you how much time should be between every request to not get banned.
46
+
47
+ Example robots.txt from huffpost.com
48
+
49
+ ```
50
+ # Cambria robots
51
+
52
+ User-agent: grapeshot
53
+ Disallow: /member
54
+ Disallow: /*?*err_code=404
55
+ Disallow: /search
56
+ Disallow: /search/?*
57
+
58
+ User-agent: *
59
+ Crawl-delay: 4
60
+ Disallow: /*?*page=
61
+ Disallow: /member
62
+ Disallow: /*?*err_code=404
63
+ Disallow: /search
64
+ Disallow: /search/?*
65
+ Disallow: /mapi/v4/*/user/*
66
+ Disallow: /embed
67
+
68
+ User-agent: Googlebot
69
+ Allow: /
70
+ Disallow: /*?*err_code=404
71
+ Disallow: /search
72
+ Disallow: /search/?*
73
+
74
+ User-agent: google-extended
75
+ Disallow: /
76
+
77
+ User-agent: GPTBot
78
+ Disallow: /
79
+
80
+ # archives
81
+ Sitemap: https://www.huffpost.com/sitemaps/sitemap-v1.xml
82
+ Sitemap: https://www.huffpost.com/sitemaps/sitemap-google-news.xml
83
+ Sitemap: https://www.huffpost.com/sitemaps/sitemap-google-video.xml
84
+ Sitemap: https://www.huffpost.com/sitemaps/sections.xml
85
+
86
+ # huffingtonpost.com archive sitemaps
87
+ Sitemap: https://www.huffpost.com/sitemaps-huffingtonpost/sitemap.xml
88
+ Sitemap: https://www.huffpost.com/sitemaps-huffingtonpost/sections.xml
89
+ ```
90
+
91
+ ## Inspired by
92
+ ```
93
+ @article{misra2019sarcasm,
94
+ title={Sarcasm Detection using Hybrid Neural Network},
95
+ author={Misra, Rishabh and Arora, Prahal},
96
+ journal={arXiv preprint arXiv:1908.07414},
97
+ year={2019}
98
+ }
99
+
100
+ @book{misra2021sculpting,
101
+ author = {Misra, Rishabh and Grover, Jigyasa},
102
+ year = {2021},
103
+ month = {01},
104
+ pages = {},
105
+ title = {Sculpting Data for ML: The first act of Machine Learning},
106
+ isbn = {9798585463570}
107
+ }
108
+ ```