Skip to content

Commit ab0126c

Browse files
committed
Merge branch 'refs/heads/master' into feat/datepicker-absolute-relative
# Conflicts: # sources/platform/actors/development/actor_definition/input_schema/specification.md
2 parents 703212f + 1ab71bf commit ab0126c

File tree

59 files changed

+1413
-245
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1413
-245
lines changed

.github/workflows/lychee.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
- name: Run Lychee Link Checker
3535
id: lychee
36-
uses: lycheeverse/lychee-action@v1.10.0
36+
uses: lycheeverse/lychee-action@v2.0.0
3737
env:
3838
GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
3939
with:

_typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
extend-ignore-re = [
33
'`[^`\n]+`', # skip inline code
44
'```[\s\S]*?```', # skip code blocks
5+
'Bún bò Nam Bô', # otherwise "Nam" is considered as a typo of "Name"
56
]
67

78
[default.extend-words]

docusaurus.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ module.exports = {
5151
/** @type {import('@docusaurus/types').ReportingSeverity} */ ('throw'),
5252
onBrokenMarkdownLinks:
5353
/** @type {import('@docusaurus/types').ReportingSeverity} */ ('throw'),
54+
onBrokenAnchors:
55+
/** @type {import('@docusaurus/types').ReportingSeverity} */ ('warn'),
5456
themes: [
5557
[
5658
require.resolve('./apify-docs-theme'),

sources/academy/platform/deploying_your_code/input_schema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Each property's key corresponds to the name we're expecting within our code, whi
5353

5454
## Property types & editor types {#property-types}
5555

56-
Within our new **numbers** property, there are two more fields we must specify. Firstly, we must let the platform know that we're expecting an array of numbers with the **type** field. Then, we should also instruct Apify on which UI component to render for this input property. In our case, we have an array of numbers, which means we should use the **json** editor type that we discovered in the ["array" section](/platform/actors/development/actor-definition/input-schema#array) of the input schema documentation. We could also use **stringList**, but then we'd have to parse out the numbers from the strings.
56+
Within our new **numbers** property, there are two more fields we must specify. Firstly, we must let the platform know that we're expecting an array of numbers with the **type** field. Then, we should also instruct Apify on which UI component to render for this input property. In our case, we have an array of numbers, which means we should use the **json** editor type that we discovered in the ["array" section](/platform/actors/development/actor-definition/input-schema/specification/v1#array) of the input schema documentation. We could also use **stringList**, but then we'd have to parse out the numbers from the strings.
5757

5858
```json
5959
{

sources/academy/platform/expert_scraping_with_apify/actors_webhooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ slug: /expert-scraping-with-apify/actors-webhooks
77

88
# Webhooks & advanced Actor overview {#webhooks-and-advanced-actors}
99

10-
**Learn more advanced details about Actors, how they work, and the default configurations they can take. **Also**,** learn how** to integrate your Actor with webhooks.**
10+
**Learn more advanced details about Actors, how they work, and the default configurations they can take. Also, learn how to integrate your Actor with webhooks.**
1111

1212
---
1313

sources/academy/platform/expert_scraping_with_apify/bypassing_anti_scraping.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You might have already noticed that we've been using the **RESIDENTIAL** proxy g
2020
## Learning 🧠 {#learning}
2121

2222
- Skim [this page](https://apify.com/proxy) for a general idea of Apify Proxy.
23-
- Give the [proxy documentation](/platform/proxy#our-proxies) a solid readover (feel free to skip most of the examples).
23+
- Give the [proxy documentation](/platform/proxy) a solid readover (feel free to skip most of the examples).
2424
- Check out the [anti-scraping guide](../../webscraping/anti_scraping/index.md).
2525
- Gain a solid understanding of the [SessionPool](https://crawlee.dev/api/core/class/SessionPool).
2626
- Look at a few Actors on the [Apify store](https://apify.com/store). How are they utilizing proxies?

sources/academy/platform/expert_scraping_with_apify/solutions/handling_migrations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ That's everything! Now, even if the Actor migrates (or is gracefully aborted and
231231

232232
**A:** It's not best to use this option by default. If it fails, there must be a reason, which would need to be thought through first - meaning that the edge case of failing should be handled when resurrecting the Actor. The state should be persisted beforehand.
233233

234-
**Q: Migrations happen randomly, but by [aborting gracefully](/platform/actors/running#aborting-runs), you can simulate a similar situation. Try this out on the platform and observe what happens. What changes occur, and what remains the same for the restarted Actor's run?**
234+
**Q: Migrations happen randomly, but by [aborting gracefully](/platform/actors/running/runs-and-builds#aborting-runs), you can simulate a similar situation. Try this out on the platform and observe what happens. What changes occur, and what remains the same for the restarted Actor's run?**
235235

236236
**A:** After aborting or throwing an error mid-process, it manages to start back from where it was upon resurrection.
237237

sources/academy/platform/expert_scraping_with_apify/solutions/integrating_webhooks.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ const dataset = await Actor.openDataset(datasetId);
4040
// ...
4141
```
4242

43+
> Tip: You will need to use `forceCloud` option - `Actor.openDataset(<name/id>, { forceCloud: true });` - to open dataset from platform storage while running Actor locally.
44+
4345
Next, we'll grab hold of the dataset's items with the `dataset.getData()` function:
4446

4547
```js
@@ -141,7 +143,7 @@ https://api.apify.com/v2/acts/USERNAME~filter-actor/runs?token=YOUR_TOKEN_HERE
141143
142144
Whichever one you choose is totally up to your preference.
143145
144-
Next, within the Actor, we will click the **Integrations** tab and choose **Webhook**, then fill out the details to look like this:
146+
Next, within the Amazon scraping Actor, we will click the **Integrations** tab and choose **Webhook**, then fill out the details to look like this:
145147
146148
![Configuring a webhook](./images/adding-webhook.jpg)
147149
@@ -163,7 +165,7 @@ Additionally, we should be able to see that our **filter-actor** was run, and ha
163165
164166
**Q: How do you allocate more CPU for an Actor's run?**
165167
166-
**A:** On the platform, more memory can be allocated in the Actor's input configuration, and the default allocated CPU can be changed in the Actor's **Settings** tab. When running locally, you can use the **APIFY_MEMORY_MBYTES**** environment variable to set the allocated CPU. 4GB is equal to 1 CPU core on the Apify platform.
168+
**A:** On the platform, more memory can be allocated in the Actor's input configuration, and the default allocated CPU can be changed in the Actor's **Settings** tab. When running locally, you can use the **APIFY_MEMORY_MBYTES** environment variable to set the allocated CPU. 4GB is equal to 1 CPU core on the Apify platform.
167169
168170
**Q: Within itself, can you get the exact time that an Actor was started?**
169171

sources/academy/platform/expert_scraping_with_apify/solutions/rotating_proxies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const crawler = new CheerioCrawler({
5050
});
5151
```
5252

53-
Now, we'll use the **maxUsageCount** key to force each session to be thrown away after 5 uses and **maxErrorScore**** to trash a session once it receives an error.
53+
Now, we'll use the **maxUsageCount** key to force each session to be thrown away after 5 uses and **maxErrorScore** to trash a session once it receives an error.
5454

5555
```js
5656
const crawler = new CheerioCrawler({

sources/academy/platform/expert_scraping_with_apify/solutions/saving_stats.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ await Stats.initialize();
6363
6464
## Tracking errors {#tracking-errors}
6565
66-
In order to keep track of errors, we must write a new function within the crawler's configuration called **failedRequestHandler**. Passed into this function is an object containing an **Error** object for the error which occurred and the **Request** object, as well as information about the session and proxy which were used for the request.
66+
In order to keep track of errors, we must write a new function within the crawler's configuration called **errorHandler**. Passed into this function is an object containing an **Error** object for the error which occurred and the **Request** object, as well as information about the session and proxy which were used for the request.
6767
6868
```js
6969
const crawler = new CheerioCrawler({
@@ -79,7 +79,7 @@ const crawler = new CheerioCrawler({
7979
maxConcurrency: 50,
8080
requestHandler: router,
8181
// Handle all failed requests
82-
failedRequestHandler: async ({ error, request }) => {
82+
errorHandler: async ({ error, request }) => {
8383
// Add an error for this url to our error tracker
8484
Stats.addError(request.url, error?.message);
8585
},

0 commit comments

Comments
 (0)