kopia lustrzana https://github.com/Stopka/fedicrawl
Porównaj commity
No commits in common. "8f42791ee2bdc70063cf846701345cb5aab38033" and "c0b10f2e7ae62a347bde4686052c85672f510ba1" have entirely different histories.
8f42791ee2
...
c0b10f2e7a
|
@ -1,6 +1,5 @@
|
|||
import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'
|
||||
import robotsParser from 'robots-parser'
|
||||
import { getDefaultTimeoutMilliseconds } from '../getDefaultTimeoutMilliseconds.js'
|
||||
import RobotsTxt from './RobotsTxt.js'
|
||||
import { RobotsTxtError } from './RobotsTxtError.js'
|
||||
|
||||
|
@ -11,10 +10,7 @@ export default async function fetchRobotsTxt (domain: string): Promise<RobotsTxt
|
|||
const url = `https://${domain}/robots.txt`
|
||||
let content = ''
|
||||
try {
|
||||
const robotsTxt = await axios.get(url, {
|
||||
headers: { 'User-Agent': userAgent },
|
||||
timeout: getDefaultTimeoutMilliseconds()
|
||||
})
|
||||
const robotsTxt = await axios.get(url)
|
||||
content = robotsTxt.data
|
||||
} catch (error) {
|
||||
console.info('Robots.txt not found', { error, url })
|
||||
|
|
|
@ -13,7 +13,7 @@ export const refreshFeedsOnPage = async (
|
|||
robotsTxt: RobotsTxt
|
||||
): Promise<Feed[]> => {
|
||||
const feedData = await provider.retrieveFeeds(node.domain, page, robotsTxt)
|
||||
const indexableFeedData = feedData.filter(item => item.indexable && !item.description.includes('#nobot'))
|
||||
const indexableFeedData = feedData.filter(item => item.indexable && !item.description.includes('#noindex'))
|
||||
console.info('Retrieved feeds', {
|
||||
count: feedData.length,
|
||||
indexableCount: indexableFeedData.length,
|
||||
|
|
Ładowanie…
Reference in New Issue