Skip to content

Commit 5f0cafa

Browse files
committed
feat(website): blog post about chrome + atom
1 parent e16ed92 commit 5f0cafa

File tree

7 files changed

+87
-4
lines changed

7 files changed

+87
-4
lines changed

.github/workflows/lint-and-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- uses: actions/setup-node@v1
1919
with:
2020
node-version: 14
21-
21+
2222
- name: Get yarn cache directory path
2323
id: yarn-cache-dir-path
2424
run: echo "::set-output name=dir::$(yarn cache dir)"
@@ -27,9 +27,9 @@ jobs:
2727
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
2828
with:
2929
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
30-
key: ${{ runner.os }}-yarn${{ hashFiles('**/yarn.lock') }}
30+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
3131
restore-keys: |
32-
${{ runner.os }}-yarn
32+
${{ runner.os }}-yarn-
3333
3434
- name: Install Dependencies
3535
run: yarn install --immutable --network-timeout 1000000

website/blog/2020-12-29-why-handlers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: 'Scaling SecretAgent Scrapes with Handlers'
3-
path: /handling-scale
3+
path: /blog/handling-scale
44
date: 2020-12-29
55
summary: "We needed a simpler approach to scaling out to multiple machines running SecretAgent and 1000s of waiting actions. So we added a new concept called Handlers."
66
---
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: 'Moving from Chromium to Chrome'
3+
path: /blog/chromium-chrome
4+
date: 2021-02-19
5+
summary: "We're moving our underlying engine from Chromium to Chrome in the coming weeks."
6+
---
7+
8+
We're moving our underlying engine from Chromium to Chrome in the coming weeks.
9+
10+
## Why?
11+
There are a few reasons we decided to go this direction:
12+
1. Chrome is the actual browser being used in the wild by consumers.
13+
2. Chrome has increasingly diverged from Chromium. In our DoubleAgent testing, we're seeing Chrome 85-89 steadily diverge features. This makes it harder and harder to emulate Chrome when using Chromium as the engine.
14+
3. Chrome has certain features that aren't in Chromium that will be nearly impossible to emulate (x-headers to Google sites, Widevine, etc). In theory, you could use DRM as a way to weed out Chromium users masking themselves as Chrome users.
15+
16+
## Chrome Version-Specific Installers
17+
This switch was somewhat challenging, primarily because the Chrome team doesn't openly publish versions of Chrome that stay on the version you want them on. Even on Ubuntu, if you install the .deb release, it will install an apt updater, and if you're not careful, your engine will swap out underneath you.
18+
19+
Our first task was to go out and find stable Chrome installations for each version. We created a new project called [chrome-versions](https://github.com/ulixee/chrome-versions) that downloads, extracts, and stores versions of Chrome for Linux, Windows and Mac.
20+
21+
For each version, we stripped out the auto-update features and converted them to .tar archives that can be extracted side-by-side. They're then published on Github as release assets for each Chrome version (eg, https://github.com/ulixee/chrome-versions/releases/tag/88.0.4324.182)
22+
23+
On Debian/Ubuntu, Chrome often needs packages to be installed. We re-bundled the .deb control file into a new installer that can be run after you extract the chrome executable - this makes setting up CI or docker very simple for 1 or more Chrome installations.
24+
25+
## SecretAgent
26+
SecretAgent has been updated to use Chrome everywhere. Our emulators have "polyfills" auto-generated for how to resemble Chrome headed when running each version headless. The changes are significant enough from Chromium that you need to actually use Chrome underneath.
27+
28+
No changes should be visible in your scripts, but you might see some installation changes as you go to upgrade. We also experienced some changes in no-sandbox features when running on Docker. Your mileage here may vary.
29+
30+
This new release will have an updated Dockerfile and files under `tools/docker/*` showing how to get up and running on Docker-slim.

website/gridsome.config.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,27 @@ module.exports = {
7878
},
7979
},
8080
},
81+
{
82+
use: '@microflash/gridsome-plugin-feed',
83+
options: {
84+
contentTypes: ['Post'],
85+
feedOptions: {
86+
title: 'SecretAgent Blog',
87+
description: 'A blog about scraping, features and experiences developing SecretAgent',
88+
},
89+
rss: {
90+
enabled: true,
91+
output: '/feed.xml',
92+
},
93+
atom: {
94+
enabled: true,
95+
output: '/feed.atom',
96+
},
97+
json: {
98+
enabled: true,
99+
output: '/feed.json',
100+
},
101+
},
102+
},
81103
],
82104
};

website/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"dependencies": {
1515
"@gridsome/remark-prismjs": "^0.3.0",
1616
"@gridsome/vue-remark": "^0.2.1",
17+
"@microflash/gridsome-plugin-feed": "^1.2.1",
1718
"@types/json2md": "^1.5.0",
1819
"@types/lodash.kebabcase": "^4.1.6",
1920
"awaited-dom": "^1.1.10",

website/src/pages/Blog.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ export default {
6161
margin-bottom: 10px;
6262
padding-bottom: 10px;
6363
}
64+
article {
65+
margin-bottom: 45px;
66+
}
6467
.read-link {
6568
}
6669
}

yarn.lock

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2537,6 +2537,14 @@
25372537
npmlog "^4.1.2"
25382538
write-file-atomic "^2.3.0"
25392539

2540+
"@microflash/gridsome-plugin-feed@^1.2.1":
2541+
version "1.2.1"
2542+
resolved "https://registry.yarnpkg.com/@microflash/gridsome-plugin-feed/-/gridsome-plugin-feed-1.2.1.tgz#b57b687f000d13adc5ca6ab1a1f1d77df0caf8b0"
2543+
integrity sha512-1/AM0igskl8pczLdjkYfHvzsBQgSoKUow2x7OfcXn3UJz0Cz79AEXs/yULKdMTcu5L2Ix/4qooa263tMsqiKdQ==
2544+
dependencies:
2545+
dayjs "^1.9.8"
2546+
feed "^4.2.1"
2547+
25402548
"@mrmlnc/readdir-enhanced@^2.2.1":
25412549
version "2.2.1"
25422550
resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
@@ -6776,6 +6784,11 @@ dateformat@^3.0.0, dateformat@^3.0.3:
67766784
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
67776785
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
67786786

6787+
dayjs@^1.9.8:
6788+
version "1.10.4"
6789+
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.4.tgz#8e544a9b8683f61783f570980a8a80eaf54ab1e2"
6790+
integrity sha512-RI/Hh4kqRc1UKLOAf/T5zdMMX5DQIlDxwUe3wSyMMnEbGunnpENCdbUgM+dW7kXidZqCttBrmw7BhN4TMddkCw==
6791+
67796792
de-indent@^1.0.2:
67806793
version "1.0.2"
67816794
resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d"
@@ -8507,6 +8520,13 @@ fd-slicer@~1.1.0:
85078520
dependencies:
85088521
pend "~1.2.0"
85098522

8523+
feed@^4.2.1:
8524+
version "4.2.2"
8525+
resolved "https://registry.yarnpkg.com/feed/-/feed-4.2.2.tgz#865783ef6ed12579e2c44bbef3c9113bc4956a7e"
8526+
integrity sha512-u5/sxGfiMfZNtJ3OvQpXcvotFpYkL0n9u9mM2vkui2nGo8b4wvDkJ8gAkYqbA8QpGyFCv3RK0Z+Iv+9veCS9bQ==
8527+
dependencies:
8528+
xml-js "^1.6.11"
8529+
85108530
figgy-pudding@^3.4.1, figgy-pudding@^3.5.1:
85118531
version "3.5.2"
85128532
resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e"
@@ -19355,6 +19375,13 @@ xhr@^2.0.1:
1935519375
parse-headers "^2.0.0"
1935619376
xtend "^4.0.0"
1935719377

19378+
xml-js@^1.6.11:
19379+
version "1.6.11"
19380+
resolved "https://registry.yarnpkg.com/xml-js/-/xml-js-1.6.11.tgz#927d2f6947f7f1c19a316dd8eea3614e8b18f8e9"
19381+
integrity sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==
19382+
dependencies:
19383+
sax "^1.2.4"
19384+
1935819385
xml-name-validator@^3.0.0:
1935919386
version "3.0.0"
1936019387
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"

0 commit comments

Comments
 (0)