Recent Posts

Pages: 1 2 3 [4] 5 6 7 8 9 10
31
PVD Python Scripts / Re: Firefox Selenimu Script Discussion
« Last post by Ivek23 on March 16, 2025, 07:47:18 am »
I must have made a mistake, I just didn't notice it (I still have a lot of things to sort out for my mother's passing, so some details are missing and I don't notice them). I'll fix that and see if it works.
32
PVD Python Scripts / Re: Firefox Selenimu Script Discussion
« Last post by afrocuban on March 15, 2025, 10:57:33 pm »

Interesting, I also did a test with Chromedriver (without using the Chrome browser), and it works great there.


I am so happy to hear it works!

Here are the Scripts adapted for firefox so that you can see my adaptation and maybe errors or I did something wrong or did not change anything.


The script looks mostly fine, but there is an issue in the following lines:

Quote
firefox_options_options.add_argument("--headless")  # Running Firefox in headless mode
firefox_options_options.add_argument(f"--lang={language_code}")
firefox_options_options.add_argument("--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36")
firefox_options_options.add_argument("--enable-unsafe-swiftshader") # Add this flag to use unsafe SwiftShader

Here, firefox_options_options is used, but the variable should be firefox_options. The correct lines should be:

Quote
firefox_options.add_argument("--headless")  # Running Firefox in headless mode
firefox_options.add_argument(f"--lang={language_code}")
firefox_options.add_argument("--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36")
firefox_options.add_argument("--enable-unsafe-swiftshader") # Add this flag to use unsafe SwiftShader

Once this change is made, the script should work as expected. Other than that, the syntax looks correct! Just make sure you have the necessary dependencies installed and the correct path to geckodriver.
33
PVD Python Scripts / Re: Firefox Selenimu Script Discussion
« Last post by Ivek23 on March 15, 2025, 08:44:54 pm »
Here are the Scripts adapted for firefox so that you can see my adaptation and maybe errors or I did something wrong or did not change anything.

Scripts adapted for firefox are attached.

Interesting, I also did a test with Chromedriver (without using the Chrome browser), and it works great there.
34
PVD Python Scripts / Re: Firefox Selenimu Script Discussion
« Last post by afrocuban on March 15, 2025, 07:37:21 pm »

No, I didn't rename Selenium_Chrome_Base_page_v4.py or the other python files, because it would be too time-consuming to do it everywhere in the .psf files. Everything I did in all the python files, I only changed the settings on firefox and geckodriver.
When the driver is called in python script, is it called as chrome, or gecko? It would be good to share you script so we could visually see how you adjusted it.

Quote

That's all that was written in python_script_base_page.txt.
Quote
2025-03-15 10:08:08,399 - DEBUG - Starting the Python script.
2025-03-15 10:08:08,403 - DEBUG - Starting new HTTP connection (1): ipinfo.io:80
2025-03-15 10:08:08,641 - DEBUG - http://ipinfo.io:80 "GET /country HTTP/1.1" 200 27
2025-03-15 10:08:08,642 - DEBUG - Country code: SI, Language code: sl


This why I suspect driver isn't called at all... Try to test the script from the cmd and you will get more informative response. For the title search:

Quote
pyhton FullPathToTheScript titleIMDb "10 Things...." (with the double qoutes, or single quotes, it depends on your setting, try them both)

for the main page:

Quote
pyhton FullPathToTheScript "MovieURL" "FullPathToThe\downpage-UTF8_NO_BOM.htm" (with the double qoutes, or single quotes, it depends on your setting, try them both)
35
PVD Python Scripts / Re: Firefox Selenimu Script Discussion
« Last post by Ivek23 on March 15, 2025, 10:11:16 am »
1. Did you rename any files, in this case did you rename Selenium_Chrome_Base_page_v4.py? If so, rename everywhere in the .psf too.

No, I didn't rename Selenium_Chrome_Base_page_v4.py or the other python files, because it would be too time-consuming to do it everywhere in the .psf files. Everything I did in all the python files, I only changed the settings on firefox and geckodriver.

2. What says in the correspondent base.log file in \Tmp folder?

That's all that was written in python_script_base_page.txt.
Quote
2025-03-15 10:08:08,399 - DEBUG - Starting the Python script.
2025-03-15 10:08:08,403 - DEBUG - Starting new HTTP connection (1): ipinfo.io:80
2025-03-15 10:08:08,641 - DEBUG - http://ipinfo.io:80 "GET /country HTTP/1.1" 200 27
2025-03-15 10:08:08,642 - DEBUG - Country code: SI, Language code: sl


Ok, that's better. Let's move debugging to the other topic, you may call it Firefox Selenium?

Ok.
36
PVD Python Scripts / Re: Firefox Selenimu Script Discussion
« Last post by afrocuban on March 15, 2025, 08:31:48 am »
Ok, that's better. Let's move debugging to the other topic, you may call it Firefox Selenium?  Several ideas:
1. Did you rename any files, in this case did you rename Selenium_Chrome_Base_page_v4.py? If so, rename everywhere in the .psf too.
2. What says in the correspondent base.log file in \Tmp folder?
37
PVD Python Scripts / Re: Firefox Selenimu Script Discussion
« Last post by Ivek23 on March 15, 2025, 04:38:24 am »
I am sorry to hear that. If you could be a bit more specific maybe I'd get an idea what it might be.

This, as seen in the picture.
38
PVD Python Scripts / Re: Chrome Selenium v4 of Movie and People scripts progress
« Last post by afrocuban on March 15, 2025, 12:09:36 am »
I am sorry to hear that. If you could be a bit more specific maybe I'd get an idea what it might be.

In the meantime, I have started to work on upgrading Selenium Chrome search script to be "one for all". Now you can chose between different title types as I grouped them, plus when importing for example series and movies at the same time with "Tools->Scan folders...", now you can use "general" search. I will try to merge IMDb Movie and Series script, and hopefully Episodes at the end. There aren't much differencies at the first glance analyzing them
39
PVD Python Scripts / Re: Firefox Selenimu Script Discussion
« Last post by Ivek23 on March 14, 2025, 05:07:16 pm »
I never tried it, so I am not sure at all how Firefox would download pages (clicking "See more" pages, "Storyline" sections and other), and if final html code would be the same as downloaded with Chrome, so it might be frustrating to realize that there are differences actually in scraped hmtls with either.

Notice

Does not work on Win 10 and with Firefox browser and geckodriver.
40
PVD Python Scripts / Re: Firefox Selenimu Script Discussion
« Last post by afrocuban on March 14, 2025, 12:04:39 pm »
Thanks for the comprehensive explanation for Firefox browsers.

Thank you very much.

You are more than welcome, Ivek. I never tried it, so I am not sure at all how Firefox would download pages (clicking "See more" pages, "Storyline" sections and other), and if final html code would be the same as downloaded with Chrome, so it might be frustrating to realize that there are differences actually in scraped hmtls with either.

P.S. In people script, I brought back career option to base function too, so just make sure the proper switch (ShouldParseCareer) is set not to parse it with bio function.
Pages: 1 2 3 [4] 5 6 7 8 9 10