Skip to content
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

Request & fix dn.no #100

Closed
Su-Well opened this issue Jun 14, 2024 · 6 comments
Closed

Request & fix dn.no #100

Su-Well opened this issue Jun 14, 2024 · 6 comments
Labels

Comments

@Su-Well
Copy link

Su-Well commented Jun 14, 2024

Describe issue/request:
There's a bug that causes an exception when accessing a null element in the no_nhst_media_domains code. This request proposes a simple fix and proposes to add dn.no to the list of no_nhst_media_domains.

The code is fixed by changing the line

if (par.type) {

to

if (par && par.type) {

after this fix, and after adding dn.no to no_nhst_media_domains, to sites.js and manifest.json, paywall is sucessfully bypassed on dn.no.

Browser (main version): firefox and chrome

BPC-extension version (number): 3.7.1.0

Link of paywalled article: https://www.dn.no/eiendom/new-york-bosatt-hedgefondforvalter-kjopte-giganthytte-pa-kvitfjell/2-1-1660909

Actions you tried yourself and if it works (clear cookies, disabe Javascript, change user-agent/referer, reader view, archive sites and/or add a custom site): changed the code. It worked.

@bpc-clone bpc-clone changed the title Request/bug no_nhst_media_domains Request & fix dn.no Jun 16, 2024
@bpc-clone
Copy link
Owner

Good to see that another NHST site moves to the new paywall.
For all sections though like D2 and Magasin (before they had different paywalls)?

PS example article with null par?

@Su-Well
Copy link
Author

Su-Well commented Jun 17, 2024

https://www.dn.no/marked/easee-tapte-over-300-mill-etter-svensk-salgsforbud-det-brant-pa-alle-fronter/2-1-1661166 has null par, in pars[10].

It doesn't seem to work for D2 unfortunately. I'm not sure where to find the Magasin section.

@bpc-clone
Copy link
Owner

Not working for all magasiner: D2 & DN Helg (magasinet).
Site can be added, but any other sections which need to be excluded?

@Su-Well
Copy link
Author

Su-Well commented Jun 21, 2024

smak also doesn't seem to work, but everything else seems to be working

@bpc-clone
Copy link
Owner

bpc-clone commented Jun 22, 2024

Site added to latest master (or next release).
PS for magasiner articles a link to Google Search Tool (elaborate fix).

@Su-Well
Copy link
Author

Su-Well commented Jun 22, 2024

works great, thank you very much.

@Su-Well Su-Well closed this as completed Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants