Skip to content

Conversation

@Obersand
Copy link
Collaborator

Update to new EventBrite tags:

  • p.location-info__address-textspan.start-date-and-location__location
  • div.location-info__address.start-date-and-location__location
  • div.eds-text--leftdiv.event-description

Scrape new EventBrite date format, leveraging the datetime atrribute for the time element when set.

Don't crash on addresses without a newline.

…'t crash on addresses without a newline.

Signed-off-by: Jeffrey Belt <jeffrey@theshifters.ch>
@Obersand Obersand marked this pull request as draft November 16, 2025 10:16
@Obersand
Copy link
Collaborator Author

Converting to draft while I address some other issues.

The class starting with `Location-module__addressWrapper___` contains the full address rather than just the address "title" which is the address line.
@thomas-bouvier
Copy link
Member

I could reproduce the issues mentioned in the first post.

@Obersand
Copy link
Collaborator Author

Obersand commented Nov 21, 2025

The issues are fixed in my eventbrite branch. I wanted to have a full run before marking the PR as ready. This is now done.

Signed-off-by: Jeffrey Belt <jeffrey@theshifters.ch>
@Obersand Obersand marked this pull request as ready for review November 21, 2025 21:13
@thomas-bouvier
Copy link
Member

I tried running the updated scraper on french events and got the following error:

Processing page {'name': '2tonnes', 'url': 'https://www.eventbrite.fr/o/2-tonnes-29470123869', 'type': 'scraper', 'id': 100}
2025-11-22 11:13:51,965 - INFO - Scrolling to the bottom...
2025-11-22 11:13:57,299 - INFO - Scrolling to the bottom...
2025-11-22 11:14:02,625 - INFO - Scrolling to the bottom...
2025-11-22 11:14:08,022 - INFO - Scrolling to the bottom...
2025-11-22 11:14:13,413 - INFO - Scrolling to the bottom...
2025-11-22 11:14:28,666 - INFO - Found 116 events
2025-11-22 11:14:29,243 - INFO - 
-> Processing https://www.eventbrite.fr/e/2tonnes-world-talleres-en-linea-en-espanol-varias-fechas-tickets-1023696833787?aff=ebdsoporgprofile ...
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/thomas/Dev/OpenFresque/trouver-une-fresque-scraper/src/trouver_une_fresque_scraper/scrape.py", line 171, in <module>
    df1 = main_scraper(scrapers, headless=args.headless)
  File "/home/thomas/Dev/OpenFresque/trouver-une-fresque-scraper/src/trouver_une_fresque_scraper/scraper/main.py", line 59, in main
    records += fn_key(sourcev, service=service, options=options)
               ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/thomas/Dev/OpenFresque/trouver-une-fresque-scraper/src/trouver_une_fresque_scraper/scraper/eventbrite.py", line 211, in get_eventbrite_data
    location_el = driver.find_element(
        By.CSS_SELECTOR, 'div[class^="Location-module__addressWrapper___"'
    )
  File "/home/thomas/Dev/OpenFresque/trouver-une-fresque-scraper/.flox/cache/python-uv/venv/lib/python3.13/site-packages/selenium/webdriver/remote/webdriver.py", line 766, in find_element
    return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/thomas/Dev/OpenFresque/trouver-une-fresque-scraper/.flox/cache/python-uv/venv/lib/python3.13/site-packages/selenium/webdriver/remote/webdriver.py", line 380, in execute
    self.error_handler.check_response(response)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/home/thomas/Dev/OpenFresque/trouver-une-fresque-scraper/.flox/cache/python-uv/venv/lib/python3.13/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: div[class^="Location-module__addressWrapper___"; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
Stacktrace:
RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5
NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:511:5
dom.find/</<@chrome://remote/content/shared/DOM.sys.mjs:136:16

Maybe we should use a fallback?

@thomas-bouvier
Copy link
Member

It should be noted that main also fails:

-> Processing https://www.eventbrite.fr/e/2tonnes-world-talleres-en-linea-en-espanol-varias-fechas-tickets-1023696833787?aff=ebdsoporgprofile ...
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/thomas/Dev/OpenFresque/trouver-une-fresque-scraper/src/trouver_une_fresque_scraper/scrape.py", line 171, in <module>
    df1 = main_scraper(scrapers, headless=args.headless)
  File "/home/thomas/Dev/OpenFresque/trouver-une-fresque-scraper/src/trouver_une_fresque_scraper/scraper/main.py", line 59, in main
    records += fn_key(sourcev, service=service, options=options)
               ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/thomas/Dev/OpenFresque/trouver-une-fresque-scraper/src/trouver_une_fresque_scraper/scraper/eventbrite.py", line 208, in get_eventbrite_data
    location_el = driver.find_element(By.CSS_SELECTOR, "div.location-info__address")
  File "/home/thomas/Dev/OpenFresque/trouver-une-fresque-scraper/.flox/cache/python-uv/venv/lib/python3.13/site-packages/selenium/webdriver/remote/webdriver.py", line 766, in find_element
    return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/thomas/Dev/OpenFresque/trouver-une-fresque-scraper/.flox/cache/python-uv/venv/lib/python3.13/site-packages/selenium/webdriver/remote/webdriver.py", line 380, in execute
    self.error_handler.check_response(response)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/home/thomas/Dev/OpenFresque/trouver-une-fresque-scraper/.flox/cache/python-uv/venv/lib/python3.13/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: div.location-info__address; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
Stacktrace:
RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5
NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:511:5
dom.find/</<@chrome://remote/content/shared/DOM.sys.mjs:136:16

Signed-off-by: Jeffrey Belt <jeffrey@theshifters.ch>
@Obersand
Copy link
Collaborator Author

Obersand commented Nov 22, 2025

Taking a look!

Working notes:

  • The scraper fails to detect that this is an online event (people get increasingly creative where they disclose the information) so looks for the address.
  • There are two locations in each EventBrite event: a brief summary above the event description, and a full address near the bottom at the page. It's plain text in this case and not a button or link to an online map so there's no address wrapper.

I'll fix it by Monday.

@Obersand Obersand marked this pull request as draft November 22, 2025 15:23
EventBrite events have two locations, a "short" one at the top and a full one with address and a lot more text like routing directions at the bottom. The elements and therefore the CSS selectors
vary depending on the event being offline (just text) or online (link to another element on the page).

The scraper now detects whether an element is online by searching for the short location (CSS selector `span.start-date-and-location__location`) which is present in both cases.

The scraper also doesn't crash if it expects an offline element and cannot find the full location. Instead, it logs an error and continues to the next event. This can happen when the scraper
doesn't detect that the event is online.

Signed-off-by: Jeffrey Belt <jeffrey@theshifters.ch>
Signed-off-by: Jeffrey Belt <jeffrey@theshifters.ch>
@Obersand
Copy link
Collaborator Author

Fixed in the branch. I have to postpone adding support for a new kind of EventBrite collection (issue #79).

I also added a couple more date & time fixes (issue #75).

I'm unable to complete a 2tonnes run for France. I never was: something almost always times out after running for dozens of minutes. But the log until then looks good.

@Obersand Obersand marked this pull request as ready for review November 24, 2025 08:37
@thomas-bouvier
Copy link
Member

Thank you very much @Obersand, I could run the scraper on french events 👍

@thomas-bouvier thomas-bouvier merged commit e37b676 into openfresque:main Nov 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants