last day (15 days later) » 

10:23 AM
0
A: Scraping asb.net site does not work when using a function in selenium in python

Duc NguyenIt's because the website of Moroccan's Ministry of Justice is so old that your programme can't handle it. According to this thread, you'll need to downgrade your cryptography and pyOpenSSL packages to handle the website: pip install --upgrade cryptography==36.0.2 pip install --upgrade pyOpenSSL==...

 
No is not Working
 
How do you run your spider? What error do you see? Normally, just cd into the folder that your python file is in, then scrapy runspider your_python_file.py.
 
for runing the spider i use scrapy crawl boursakuwait
there is no error but during the execution the parse method which contains the launch of the site does not work. the browser simply closes
 
Thanks for clarifying, I've edited my answer. Try the above, see if it works.
 
Thank you for your anwser but he is not working. This problem is for asp.net website , if i try another website (not an asp.net website) the method of parse work fine
 
10:23 AM
What error do you see in your terminal? It'd be strange if the terminal shows nothing at all.
 
Traceback (most recent call last): File "C:\Users\DELL-PC\AppData\Local\Programs\Python\Python310\li‌​b\site-packages\scra‌​py\core\downloader\m‌​iddleware.py", line 49, in process_request return (yield download_func(request=request, spider=spider)) twisted.web._newclient.ResponseNeverReceived: [<twisted.python.failure.Failure OpenSSL.SSL.Error: [('SSL routines', '', 'unsafe legacy renegotiation disabled')]>] 2022-10-04 09:34:48 [scrapy.core.engine] INFO: Closing spider (finished)
 
Yeah, that's the exact error I've got. Did downgrading cryptography and pyOpenSSL in the terminal do nothing at all?
 
nothing at all I have already installed it without any result
 
I've edited my answer again. Downgrading worked for me with the exact same error. Try downgrading/installing all the other packages I mentioned.
 
10:38 AM
If you have multiple Python environments, be sure to use the downgraded one.
 
 
1 hour later…
11:43 AM
Thank you so much is working now
but i test another asp.net website but he didn't work
what a problem can be ?
 
12:30 PM
Nice to hear. I'm not exactly sure myself, but the GitHub thread that I linked explained that it's due to old SSL certificate on the website itself.
 
 
1 hour later…
1:38 PM
so now i think i need to find the better version of SSL
 

last day (15 days later) »