Unexpected error while parsing data
Unexpected error while parsing data for title 'The Girl with the Needle'
Fallo con Python 3.9, actualice a 3.13.2 y también falla:
Unexpected error while parsing data on page 'https://www.filmaffinity.com/en/userratings.php?user_id=XXX&p=1&orderby=rating-date&chv=list'
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\XXX\AppData\Local\Programs\Python\Python313\Scripts\fa-scraper.exe\__main__.py", line 7, in <module>
sys.exit(main())
~~~~^^
File "C:\Users\XXX\AppData\Local\Programs\Python\Python313\Lib\site-packages\fa_scraper\cli.py", line 78, in main
save_to_csv(data, fieldnames, export_file)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\XXX\AppData\Local\Programs\Python\Python313\Lib\site-packages\fa_scraper\fa_scraper.py", line 285, in save_to_csv
for d in dicts:
^^^^^
File "C:\Users\XXX\AppData\Local\Programs\Python\Python313\Lib\site-packages\fa_scraper\fa_scraper.py", line 154, in get_profile_data
title_type[0].find_all(class_="type")[0].string.strip(),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
También he probado en español y mismo error.
Quitando la nota de 'The Girl with the Needle' parece funcionar y me muestra como pasa paginas hasta que se queda parado en 'Page 28' de un total de 67, en esta página se queda el cursor parpadeando y el archivo 'test.csv' ha guardado 1396 votaciones. Lo he dejado un buen rato y ya no guarda nada más.
Hola, podrías confirmarme qué versión de fa-scraper estás ejecutando? Puedes hacerlo con fa-scraper --version
fa-scraper 0.4.1, puntua The Girl with the Needle (https://www.filmaffinity.com/es/film678742.html) y usa tu script para intentar descubrir el error.
El tema de que se pare en una página en concreto, en mi caso en la 28 de 67, ni idea, con suerte estará relacionado.
Okay, le echaré un vistazo en las próximas semanas, gracias!
Buenas, aquí tengo el mismo problema
fa-scraper --csv letterbox 909632 Unexpected`` error while parsing data for title 'A Stormy Night' Unexpected error while parsing data on page 'https://www.filmaffinity.com/en/userratings.php?user_id=909632&p=9&orderby=rating-date&chv=list' Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.13/bin/fa-scraper", line 8, in <module> sys.exit(main()) ~~~~^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/fa_scraper/cli.py", line 78, in main save_to_csv(data, fieldnames, export_file) ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/fa_scraper/fa_scraper.py", line 285, in save_to_csv for d in dicts: ^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/fa_scraper/fa_scraper.py", line 154, in get_profile_data title_type[0].find_all(class_="type")[0].string.strip(), ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^ IndexError: list index out of range
Gracias
Hola. Otro fallo similar, por si ayuda. Se para siempre en esta película, en la cuarta página de 31 en total. Probado tanto en español como en inglés con el mismo resultado.
fa-scraper 0.4.1 ejecutado en entorno virtual python 3.13
Un saludo y muchas gracias.
Unexpected error while parsing data for title 'Last and First Men'
Unexpected error while parsing data on page 'https://www.filmaffinity.com/es/userratings.php?user_id=650011&p=4&orderby=rating-date&chv=list'
Traceback (most recent call last):
File "/home/xxx/mienv/bin/fa-scraper", line 8, in <module>
sys.exit(main())
~~~~^^
File "/home/xxx/mienv/lib/python3.13/site-packages/fa_scraper/cli.py", line 78, in main
save_to_csv(data, fieldnames, export_file)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xxx/mienv/lib/python3.13/site-packages/fa_scraper/fa_scraper.py", line 285, in save_to_csv
for d in dicts:
^^^^^
File "/home/xxx/mienv/lib/python3.13/site-packages/fa_scraper/fa_scraper.py", line 154, in get_profile_data
title_type[0].find_all(class_="type")[0].string.strip(),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range