-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting working links as dead in result ! #41
Comments
@transitive-bullshit @davidtheclark Need your help with this issue. |
hey! thanks for your patience! In this upcoming version, that’s improved. For this code: import remarkLint from 'remark-lint'
import remarkLintNoDeadUrls from 'remark-lint-no-dead-urls'
import remarkParse from 'remark-parse'
import remarkStringify from 'remark-stringify'
import {unified} from 'unified'
import {reporter} from 'vfile-reporter'
const document = `# remark-lint-no-dead-urls
[Udemy link](https://www.udemy.com/course/react-redux)
[Have I been Pwned](http://haveibeenpwned.com)`
const file = await unified()
.use(remarkParse)
.use(remarkLint)
.use(remarkLintNoDeadUrls)
.use(remarkStringify)
.process(document)
console.error(reporter(file)) You’d get:
The second error is simple, and useful: switch to the HTTPS URL in your markdown and it’s solved. The other error happens because udemy has some advanced security measures in place. + .use(remarkLintNoDeadUrls, {
+ deadOrAliveOptions: {
+ userAgent:
+ 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0'
+ }
+ }) ...but here that doesn’t work, they still know it’s automated access. deadOrAliveOptions: {
userAgent:
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0'
- }
+ },
+ skipUrlPatterns: [/^https:\/\/www.udemy.com\//i]
})
.use(remarkStringify)
.process(document) Closing this for now, will release in the coming days! |
The package is considering some active links as dead URLs. for example :
Udemy : Modern React with Redux
Have I Been Pwned
Using the remark-lint package as below:
and getting the result:
The text was updated successfully, but these errors were encountered: