Alcuni siti sono bloccati dal oneboxing

Ho riscontrato un problema con l’anteprima onebox da quando ho aggiornato il 4 maggio. Non tutti gli hyperlink riescono a generare con successo la casella di anteprima.

Tuttavia, questi hyperlink funzionavano tutti correttamente su meta fino a oggi, quando ho finalmente trovato un hyperlink che presenta un problema simile* su meta.
*codice di errore diverso

Si prega di fornire indicazioni. Grazie per l’aiuto.

https://medium.com/swlh/5-free-python-courses-for-beginners-to-learn-online-e1ca90687caf

1 Mi Piace

Ho provato a Oneboxare quel link sul mio forum e ho ottenuto lo stesso risultato.
L’ho notato subito quando ho controllato quel link. Ha restituito due eccezioni. Il link non può essere Oneboxato a causa di ciò. Ecco perché tu/noi abbiamo ricevuto quel messaggio nel Onebox.

1 Mi Piace

@jamie.wilson sta indagando sui problemi relativi alle onebox di medio livello; abbiamo una soluzione in fase di sviluppo

4 Mi Piace

Sì, sembra lo stesso problema che genera un errore 500. Abbiamo già risolto questa cosa, @jamie.wilson?

3 Mi Piace

Il link fornito da @SkyLin genera di nuovo un Onebox:

https://medium.com/swlh/5-free-python-courses-for-beginners-to-learn-online-e1ca90687caf

Sembra che Medium abbia apportato alcune modifiche dal loro lato che hanno messo in luce alcune carenze nel modo in cui generiamo gli Onebox. Questi problemi sono stati ora risolti sul nostro lato e uniti, rendendo gli Onebox più robusti in generale (e non solo per Medium).

4 Mi Piace

Questo problema è stato risolto dopo l’aggiornamento. Grazie mille!

Comparing bbb44698...a24b6daa · discourse/discourse · GitHub

Tuttavia, il mio problema originale* persiste. C’è qualche ulteriore azione che posso intraprendere per risolverlo? Grazie ancora.

*Onebox funziona correttamente su meta ma fallisce sul mio sito per lo stesso URL:

1 Mi Piace

Ho appena provato tutti e 3 i tuoi link, quello per Medium e i due per Udemy, sul mio sito e qui su Meta. Tutti e 3 sono stati Oneboxed correttamente sia sul mio sito che qui su Meta.

2 Mi Piace

Grazie per le gentili informazioni.

Ho provato il metodo descritto in Amazon onebox fails on my site, but works here e ho ottenuto un codice di ritorno 403 per Udemy. Ho persino clonato un sito con un backup vecchio e presenta lo stesso problema. Mi chiedo se ci siano altre cause del problema, ad esempio impostazioni.

Vi chiedo gentilmente consiglio. Grazie per l’aiuto.

root@localhost:~# curl https://www.udemy.com/course/certified-kubernetes-application-developer/ -o deleteme.html --verbose
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:-- 0* Trying 2606:4700::6810:4255:443... * TCP_NODELAY set
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--  0* Connected to www.udemy.com (2606:4700::6810:4255) port 443  (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [19 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [3726 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [264 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=Udemy, Inc.; CN=*.udemy.com
*  start date: Sep 10 15:45:40 2020 GMT
*  expire date: Oct 12 15:45:40 2021 GMT
*  subjectAltName: host "www.udemy.com" matched cert's "*.udemy.com"
*  issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign RSA OV SSL CA 2018
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
} [5 bytes data]
* Using Stream ID: 1 (easy handle 0x55ba70848e10)
} [5 bytes data]
> GET /course/certified-kubernetes-application-developer/ HTTP/2
> Host: www.udemy.com
> user-agent: curl/7.68.0
> accept: */*
>
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [230 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [230 bytes data]
* old SSL session ID is stale, removing
{ [5 bytes data]
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
} [5 bytes data]
< HTTP/2 403
< date: Sat, 15 May 2021 09:15:50 GMT
< content-type: text/plain; charset=UTF-8
< content-length: 16
< x-frame-options: SAMEORIGIN
< cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-c                                                                             heck=0, pre-check=0
< expires: Thu, 01 Jan 1970 00:00:01 GMT
< cf-request-id: 0a10e892d400000ac0a696a000000001
< expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-c                                                                             gi/beacon/expect-ct"
< set-cookie: __cf_bm=b04492251e1a16bfdad619155f03441f5707d134-1621070150-1800-AS6cROKp+jLfN9ubIJem+TuX5dANVYbshBzqeRTZhheBx6lOtfM8RPRDSGDLEObLD8tWwjbrp+D5Sh4RcCTXGNw=; path=/; expires=Sat, 15-May-21 09:45:50 GMT; domain=.udemy.com; HttpOnly; Secure; SameSite=None
< x-content-type-options: nosniff
< server: cloudflare
< cf-ray: 64fb4397bea70ac0-NRT
<
{ [16 bytes data]
100    16  100    16    0     0     10      0  0:00:01  0:00:01 --:--:--    10
* Connection #0 to host www.udemy.com left intact

1 Mi Piace

Da dove proviene? Il 1970? Sono passati oltre 50 anni.

2 Mi Piace

Proviene dalla risposta di questo comando:

curl https://www.udemy.com/course/certified-kubernetes-application-developer/ -o deleteme.html --verbose

1 Mi Piace

Ed ecco la risposta di Amazon con il codice di errore 503.

root@localhost:~# curl https://www.amazon.com/Deep-Learning-Python-Francois-Chollet/dp/1617294438 -o deleteme.html --verbose
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 162.219.225.118:443...
* TCP_NODELAY set
* Connected to www.amazon.com (162.219.225.118) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [19 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [4447 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [264 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=www.amazon.com
*  start date: Apr 26 00:00:00 2021 GMT
*  expire date: Apr 25 23:59:59 2022 GMT
*  subjectAltName: host "www.amazon.com" matched cert's "www.amazon.com"
*  issuer: C=US; O=DigiCert Inc; CN=DigiCert Global CA G2
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
} [5 bytes data]
* Using Stream ID: 1 (easy handle 0x55993f5fae10)
} [5 bytes data]
> GET /Deep-Learning-Python-Francois-Chollet/dp/1617294438 HTTP/2
> Host: www.amazon.com
> user-agent: curl/7.68.0
> accept: */*
>
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [177 bytes data]
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
} [5 bytes data]
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
< HTTP/2 503
< server: Server
< date: Mon, 17 May 2021 01:37:18 GMT
< content-type: text/html
< strict-transport-security: max-age=47474747; includeSubDomains; preload
< x-amz-rid: 72RYS75V0EMTMX4RK38T
< vary: Content-Type,Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent
< last-modified: Wed, 30 Sep 2020 23:54:00 GMT
< etag: "a6f-5b0909d09d600"
< accept-ranges: bytes
< content-length: 2671
<
{ [1139 bytes data]
100  2671  100  2671    0     0   3604      0 --:--:-- --:--:-- --:--:--  3599
* Connection #0 to host www.amazon.com left intact
root@localhost:~#

Un’ultima cosa: l’anteprima onebox per Amazon funziona correttamente ora dopo l’aggiornamento del codice di Jamie. Per l’anteprima prima dell’aggiornamento, consulta questa immagine.

1 Mi Piace

Ottimo per il link ad Amazon. I link di Udemy funzionano ora o stai ancora ricevendo un errore 403 su quelli? Io non ho ancora alcun problema a Oneboxarli.

1 Mi Piace

Grazie ancora.

Tutti i collegamenti ipertestuali di Udemy non funzionano sul mio sito.

Ho appena provato un altro forum basato su Discourse e ho riscontrato lo stesso errore 403.

Sito del forum: https://forum.quantifiedself.com/

Test 1: OK
Amazon https://www.amazon.com/Deep-Learning-Python-Francois-Chollet/dp/1617294438

Test 2: NG con codice di errore 500. Immagino che questo sito non abbia ancora aggiornato alla versione più recente.
Medium https://medium.com/swlh/5-free-python-courses-for-beginners-to-learn-online-e1ca90687caf

Test 3: NG, lo stesso codice di errore 403, esattamente uguale al mio.
Udemy https://www.udemy.com/course/certified-kubernetes-application-developer/

1 Mi Piace

Ho testato tutti i siti basati su Discourse che conosco; i risultati sono riportati di seguito:

onebox sito 1 sito 2 sito 3 sito 4 sito 5 sito 6 sito 7 sito 8
Amazon OK OK OK OK OK OK OK OK
medium OK NG OK NG NG OK NG NG
udemy NG NG OK OK OK OK NG OK
posizione* Tokyo California California California California Parigi California Inghilterra
Irlanda Virginia Chicago
Africa Alaska
*testato con Check host

sito 1. https://vip.studycamp.tw/
sito 2. https://forum.quantifiedself.com/
sito 3. https://discussions.udacity.com/
sito 4. https://forum.uipath.com/
sito 5. https://forums.envato.com/
sito 6. https://rideabl.es/
sito 7. https://blenderartists.org/
sito 8. https://se23.life/

4 Mi Piace

Sei fortunato, l’unico che funziona è amazon.com.
Con tutti gli altri siti Amazon, l’anteprima onebox non funziona.

2 Mi Piace

I siti su cui stai eseguendo i test potrebbero bloccare l’user agent di curl. Il processo di Oneboxing utilizzerà l’user agent di un vero browser, a seconda dell’URL che stai cercando di Oneboxare. Al momento, l’user agent utilizzato in questi casi è:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15

Prova a eseguire i tuoi test curl con il flag -A. Ad esempio:

curl -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15" https://www.udemy.com/course/certified-kubernetes-application-developer/ -o deleteme.html --verbose

Qual è il risultato di quel comando sul tuo sistema?

Se continua a fallire:

  1. Hai eseguito un numero insolitamente elevato di richieste di Oneboxing verso questi siti? Potresti essere stato temporaneamente bloccato dai siti in questione e potresti notare che le cose iniziano a funzionare dopo aver atteso un periodo di tempo adeguato (questo dipende dagli amministratori del sito e, purtroppo, non possiamo farci nulla dalla nostra parte).

  2. Dove si trova il tuo server? Hai accesso a una macchina in una posizione diversa da cui eseguire i test? Anche testare dal tuo computer personale invece che dal server di produzione potrebbe darti risultati diversi.

4 Mi Piace

Grazie per il consiglio.

Il codice di risposta è ancora 403:

root@localhost:~# curl -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15" https://www.udemy.com/course/certified-kubernetes-application-developer/ -o deleteme.html --verbose
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 2606:4700::6810:4155:443...
* TCP_NODELAY set
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0* Connected to www.udemy.com (2606:4700::6810:4155) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [19 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [3726 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [264 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=Udemy, Inc.; CN=*.udemy.com
*  start date: Sep 10 15:45:40 2020 GMT
*  expire date: Oct 12 15:45:40 2021 GMT
*  subjectAltName: host "www.udemy.com" matched cert's "*.udemy.com"
*  issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign RSA OV SSL CA 2018
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
} [5 bytes data]
* Using Stream ID: 1 (easy handle 0x5591c76d8e10)
} [5 bytes data]
> GET /course/certified-kubernetes-application-developer/ HTTP/2
> Host: www.udemy.com
> user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15
> accept: */*
>
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [230 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [230 bytes data]
* old SSL session ID is stale, removing
{ [5 bytes data]
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
} [5 bytes data]
< HTTP/2 403
< date: Mon, 17 May 2021 23:59:37 GMT
< content-type: text/plain; charset=UTF-8
< content-length: 16
< x-frame-options: SAMEORIGIN
< cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< expires: Thu, 01 Jan 1970 00:00:01 GMT
< cf-request-id: 0a1e5e6b920000952193363000000001
< expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< set-cookie: __cf_bm=3224e014d6b0b4eca1cf8a59c6c180928b2ffa0f-1621295977-1800-AU4UK/k3sl61kbMPYizcsl1TI7NAHkvE1mfjoKIPdrvGAJJeYUF8e72hQljXNwVTO+BcqfsAXxoiQDEy1cL+aVA=; path=/; expires=Tue, 18-May-21 00:29:37 GMT; domain=.udemy.com; HttpOnly; Secure; SameSite=None
< x-content-type-options: nosniff
< server: cloudflare
< cf-ray: 6510ccf28d0a9521-NRT
<
{ [16 bytes data]
100    16  100    16    0     0     10      0  0:00:01  0:00:01 --:--:--    10
* Connection #0 to host www.udemy.com left intact

Sì, l’ho fatto. Tuttavia, il sito clonato non ha pubblicato contenuti da oltre 20 giorni e presenta lo stesso problema.

Inoltre, in base alla tabella di test che ho menzionato ieri, il sito 2 e il sito 7 hanno lo stesso problema e credo che si tratti del primo post relativo a Udemy su questi siti.

Il mio server si trova in Giappone. Posso spostare il sito clonato in un’altra area, come gli Stati Uniti, per i test più tardi oggi, e aggiornerò di nuovo a quel punto.

Aggiornamento:

  1. Dopo 11 ore, è sempre lo stesso errore 403 dopo aver spostato il sito di test clonato da Tokyo alla California. Sposterò il sito in Europa per ulteriori test più tardi e aggiornerò di nuovo domani.
  2. Lo stesso codice di errore 403 anche a Londra.

Grazie ancora.

2 Mi Piace

Ho fatto qualche test in più dal mio lato.

Posso eseguire con successo curl sull’URL di Udemy dalla mia connessione residenziale (Nord America) e anche da un server ospitato in un centro dati di alto livello (Nord America).

Il tentativo di farlo da un popolare provider di hosting (Nord America) fallisce. Anche il tentativo da un altro popolare provider di hosting (Europa) fallisce.

Quando si verifica l’errore, il corpo del contenuto che mi viene restituito è:

error code: 1020

che proviene da:

Questo post di Cloudflare spiega il significato del loro errore 1020 e cosa è possibile fare per tentare di risolverlo:

https://community.cloudflare.com/t/community-tip-fixing-error-1020-access-denied/66439

5 Mi Piace

Attualmente 2.7.0.beta8, se può essere d’aiuto.

2 Mi Piace

La nuova build risolve questo problema: l’anteprima onebox di Udemy è tornata visibile. Non sono sicuro quale parte abbia risolto il problema.

3 Mi Piace