Coder Social home page Coder Social logo

Comments (11)

bitkeeper avatar bitkeeper commented on September 18, 2024

It looks like that in def correct_times the day_start_time var( start of the first program on the current day) is wrong.
Possible to due that json version also has a start time when the program starts on the previous day and the scrape version not.

Quick fix is to make the following lines comment, this still gives :
# initialise using the start time of the first program on this day
#if programs[0]['start'] != None:
# day_start_time = programs[0]['start']

But still needs additional check to skip programs started on the previous day.

from tvgrabnlpy.

macfreek avatar macfreek commented on September 18, 2024

Let's focus on a fix where we use the times reported in JSON. First stripping the date and than adding it is indeed kind of ridicule.

To assess the urgency -- does this error only occur when the script is run between 0:00 and 4:00 (when tvgids.nl still returns the tv schedule from the previous day) or also when the script is run during other times? (Note that when the script has run once during 0.00-4.00 the bad data may propagate in the cache file, so you need to erase that in order to reset).

PS: reaction in Dutch are welcome too. I suspect all users of this software are Dutch...

from tvgrabnlpy.

ralphm avatar ralphm commented on September 18, 2024

I've just ran it and found the same error and did some debugging. When trying channel 36 (SBS 6) and looking for NCIS on Tuesday (offset=2), the date changes to Wednesday. It seems to me that indeed most of the time mangling can be removed. The JSON dates look pretty sane at first glance.

from tvgrabnlpy.

macfreek avatar macfreek commented on September 18, 2024

I'm currently going over the report, and may not have time tonight to look into it. Code contributions are most welcome :)

from tvgrabnlpy.

ralphm avatar ralphm commented on September 18, 2024

I also found this way to retrieve a program's details: http://www.tvgids.nl/json/lists/program.php?id=12424475

from tvgrabnlpy.

macfreek avatar macfreek commented on September 18, 2024

@ralphm awesome, I just got a report by someone else too. See #8.

from tvgrabnlpy.

bitkeeper avatar bitkeeper commented on September 18, 2024

Het gebeurt niet alleen tussen 0:00 en 04:00.

from tvgrabnlpy.

macfreek avatar macfreek commented on September 18, 2024

I've just committed 2da0b32 which should simply take the JSON date.

It is currently only available in the experimental branch: https://github.com/macfreek/tvgrabnlpy/tree/experimental
Please test it, and if it works, I'll push it to the master branch and release a new version.

To get to the experimental branch

git pull --all
git checkout experimental

Freek

from tvgrabnlpy.

ralphm avatar ralphm commented on September 18, 2024

This does seem to fix the problem for me. Thanks!

from tvgrabnlpy.

bitkeeper avatar bitkeeper commented on September 18, 2024

Checked some channels with programs that started yesterday.
Looks ok. Great !

from tvgrabnlpy.

macfreek avatar macfreek commented on September 18, 2024

Closing this issue; opening #14 to discusses wholes in the guide.

from tvgrabnlpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.