Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AISdb marinetraffic scraper not working #81

Open
guillermodangelo opened this issue May 21, 2024 · 6 comments
Open

AISdb marinetraffic scraper not working #81

guillermodangelo opened this issue May 21, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@guillermodangelo
Copy link

guillermodangelo commented May 21, 2024

The scraper of marinetraffic.com data by MMSI codes is not working, giving timeout error even when I can see that the MMSI exists in the Gecko driver, using the DEBUG variable set to "1".

Steps to reproduce the behavior:

import os
from aisdb.webdata.marinetraffic import VesselInfo
os.environ["DEBUG"] = "1"
output_db_filepath = 'PATH TO SQLITE DB FILE'

mmsi = [
    372351000,
    373416000,
    477003800,
    477282400,
    477519900,
    477593700,
    477831200,
    477864000,
    477905000,
    563626000,
    565715000
]

scrapper = VesselInfo(output_db_filepath)
scrapper.vessel_info_callback(mmsi)
  • OS: Windows 11
  • Gecko driver
  • Using pip virtual environment and the last version of AISdb
  • Python 3.12.3
@gabrielspadon gabrielspadon added the bug Something isn't working label May 21, 2024
@JayKumarr
Copy link
Contributor

JayKumarr commented May 24, 2024

@guillermodangelo
Can you please provide which browsers are installed on your OS? The code uses firefox browser as default to sent request to marinetraffic.

@guillermodangelo
Copy link
Author

guillermodangelo commented May 24, 2024

@JayKumarr
I'm using Firefox 126. I also have Edge and Chrome 125.
I think the issue is related to the cookie compliance message or to the div with the add.

@gabrielspadon
Copy link
Collaborator

@Jinnkunn, can you please follow up on this and loop @tsuzzy into the problem?

@Jinnkunn
Copy link
Collaborator

@Jinnkunn, can you please follow up on this and loop @tsuzzy into the problem?

Sure, we are going to work on this

@gabrielspadon
Copy link
Collaborator

@guillermodangelo, it seems the issue is due to a change in the layout of the MarineTraffic that is being scrapped. @tsuzzy is working on a solution related to this and will be uploading a nightly building of AISdb to fix it.

@gabrielspadon
Copy link
Collaborator

Unfortunately, according to the last development iteration, MarineTraffic scraping won't be available anymore. The website now implements scraping blockers and changed its business model to sell its data on a subscription system. However, we will implement an API communication module that will interact with their new subscription system, allowing the person interested in their data to merge it with AIS data stored on AISdb.

@gabrielspadon gabrielspadon added enhancement New feature or request wontfix This will not be worked on and removed bug Something isn't working labels Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants