Comments (13)
The "too old; skipping" means that the item (post) in the feed is older than the "max_age" for that feed. Doesn't look like any kind of permissions problem for the channel (or if there is, that's a separate issue)
When I examine that RSS feed by hand, I see that the first item in the feed has a date of March 25... Try this feed_url instead: https://www.reddit.com/r/kpop/new/.rss
from discord_feedbot.
With the new feed URL, I'm still getting the same "too old; skipping" error. Really have no idea why...
With debug set to 3, these are the last lines. All previous ones say "too old" as well, even though I'm using the URL for the new feed rather than default.
DEBUG:__main__:kpopreddit:item:checking database history for this item
INFO:__main__:kpopreddit:item t3_4cqjh6 unseen, processing:
INFO:__main__:kpopreddit:too old; skipping
DEBUG:__main__:kpopreddit:sleeping for 500 seconds
WARNING:asyncio:Executing <Task pending coro=<background_check_feed() running at feed2discord.py:320> wait_for=<Future pending cb=[Task._wakeup()] created at /usr/lib/python3.5/asyncio/tasks.py:503> created at feed2discord.py:333> took 0.247 seconds
from discord_feedbot.
What date/time does your system think it is? (run date -u
to see)
from discord_feedbot.
Server's time/date is Fri Apr 1 01:52:57 UTC 2016 should be fine, right?
Also on a potentially unrelated note, I tried this same thing replaced with an Instagram tag feed url (http://widget.websta.me/rss/tag/taghere) and it worked provided I set the max_age to a very high number, and started sending them into my Discord channel, but then when I tried a feed url for just one user (http://widget.websta.me/rss/n/usernamehere), it gave back this:
DEBUG:__main__:instagramtest:processing entries
DEBUG:__main__:instagramtest:item:processing this entry
DEBUG:__main__:instagramtest:item:checking database history for this item
INFO:__main__:instagramtest:item http://websta.me/p/1214601160999041871_329452045 $ unseen, processing:
ERROR:__main__:instagramtest:Unexpected error:
ERROR:__main__:(<class 'TypeError'>, TypeError('Tuple or struct_time argument r$ quired',), <traceback object at 0x7f3c364d6ec8>)
ERROR:__main__:instagramtest:giving up
So now I've got this and the Reddit error too... I've installed NTP and synced servers properly, but still the same errors for "too old" as well.
from discord_feedbot.
Yes, that date/time looks about right...
Please do a "git pull", set debug to 4 and try again with the reddit feed. I've added some additional debugging that will output all the relevant dates...
That TypeError on the instagram feed is definitely a bug, but a different bug. Can you put that into a new ticket?
from discord_feedbot.
I think I have an error with accidentally treating an item's date as if it's in the local timezone (but without converting it)... I'll have to look at that more carefully.
from discord_feedbot.
I can't figure out how to post the log because it's so long, so I've uploaded the text file with log here in it's entirety. Debug was set to 4 for this. Will make a ticket for the TypeError too. Also, my server's time is currently set to KST, if that makes a difference. Can be changed if needed.
from discord_feedbot.
This is the bit I needed:
DEBUG:__main__:kpopreddit:item:processing this entry
DEBUG:__main__:kpopreddit:item:id:t3_4czg2d
DEBUG:__main__:kpopreddit:item:checking database history for this item
INFO:__main__:kpopreddit:item t3_4czg2d unseen, processing:
INFO:__main__:kpopreddit:too old; skipping
DEBUG:__main__:kpopreddit:now:1459561548.9034908
DEBUG:__main__:kpopreddit:now:gmtime:time.struct_time(tm_year=2016, tm_mon=4, tm_mday=2, tm_hour=1, tm_min=45, tm_sec=48, tm_wday=5, tm_yday=93, tm_isdst=0)
DEBUG:__main__:kpopreddit:now:localtime:time.struct_time(tm_year=2016, tm_mon=4, tm_mday=2, tm_hour=10, tm_min=45, tm_sec=48, tm_wday=5, tm_yday=93, tm_isdst=0)
DEBUG:__main__:kpopreddit:pubDate:2016-04-02T01:45:32+00:00
DEBUG:__main__:kpopreddit:pubDate_parsed:time.struct_time(tm_year=2016, tm_mon=4, tm_mday=2, tm_hour=1, tm_min=45, tm_sec=32, tm_wday=5, tm_yday=93, tm_isdst=0)
DEBUG:__main__:{'id': 't3_4czg2d', 'link': 'https://www.reddit.com/r/kpop/comments/4czg2d/what_song_do_you_have_on_repeat_right_now/', 'guidislink': True, 'author': '/u/YeBeAWitch', 'updated': '2016-04-02T01:45:32+00:00', 'content': [{'type': 'text/html', 'base': '', 'value': '<!-- SC_OFF --><div class="md"><p>I'm normally into more upbeat stuff but for me it's <a href="https://www.youtube.com/watch?v=2fBODWRrnWM">Sunggyu's kontrol</a>. For the last week I've been playing it first no matter what I'm listening to.</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/YeBeAWitch"> /u/YeBeAWitch </a> <br/> <span><a href="https://www.reddit.com/r/kpop/comments/4czg2d/what_song_do_you_have_on_repeat_right_now/">[link]</a></span>   <span><a href="https://www.reddit.com/r/kpop/comments/4czg2d/what_song_do_you_have_on_repeat_right_now/">[comments]</a></span>', 'language': None}], 'href': 'https://www.reddit.com/user/YeBeAWitch', 'authors': [{'name': '/u/YeBeAWitch', 'href': 'https://www.reddit.com/user/YeBeAWitch'}], 'updated_parsed': time.struct_time(tm_year=2016, tm_mon=4, tm_mday=2, tm_hour=1, tm_min=45, tm_sec=32, tm_wday=5, tm_yday=93, tm_isdst=0), 'tags': [{'scheme': None, 'term': 'kpop', 'label': '/r/kpop'}], 'links': [{'rel': 'alternate', 'type': 'text/html', 'href': 'https://www.reddit.com/r/kpop/comments/4czg2d/what_song_do_you_have_on_repeat_right_now/'}], 'title': 'What song do you have on repeat right now?', 'summary': '<!-- SC_OFF --><div class="md"><p>I'm normally into more upbeat stuff but for me it's <a href="https://www.youtube.com/watch?v=2fBODWRrnWM">Sunggyu's kontrol</a>. For the last week I've been playing it first no matter what I'm listening to.</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/YeBeAWitch"> /u/YeBeAWitch </a> <br/> <span><a href="https://www.reddit.com/r/kpop/comments/4czg2d/what_song_do_you_have_on_repeat_right_now/">[link]</a></span>   <span><a href="https://www.reddit.com/r/kpop/comments/4czg2d/what_song_do_you_have_on_repeat_right_now/">[comments]</a></span>', 'title_detail': {'type': 'text/plain', 'base': '', 'value': 'What song do you have on repeat right now?', 'language': None}, 'author_detail': {'name': '/u/YeBeAWitch', 'href': 'https://www.reddit.com/user/YeBeAWitch'}}
from discord_feedbot.
Yeah, I think this is likely a timezone bug... Probably have to change how I do those date comparisons.
In the meantime, I think you can work around this by setting the "TZ" environment variable to "UTC" when you run the script. Like: TZ=UTC python feed2discord.py
from discord_feedbot.
TZ=UTC python feed2discord.py
did the trick, posts fine now and I've set it up to posts 3 subreddits so far, works beautifully. Thanks!
from discord_feedbot.
I just pushed a change that should force it to do the equivalent on its own. If you git pull
you should be able to run without manually doing the "TZ=UTC" thing anymore.
from discord_feedbot.
Runs fine with just python feed2discord.py
now, much better.
from discord_feedbot.
FYI, there's some major improvements to the timezone handling. Should work on Windows or Linux, and does things even smarter than that workaround. A "git pull" to get the latest should work, or you can look at #24 to see the details.
from discord_feedbot.
Related Issues (20)
- Action Required: Fix Renovate Configuration
- Installed all python 3.6.0 modules, but having problem. HOT 4
- i would like to get your bot on my server. HOT 1
- Please add bot to server
- New feedbot user HOT 1
- New Feedbot User HOT 1
- Feedbot Request for Discord Channel HOT 1
- New Feedbot User HOT 1
- New Feedbot install requesting setup HOT 1
- Please add my server for news publishing HOT 1
- Requesting feedbot join my server HOT 3
- Invalid version specifier in requirements.txt HOT 1
- Please set up feeds for us. HOT 1
- Davinci Server configuration HOT 2
- Is a change of channel id possible please? HOT 1
- Request to set up your feedbot, please HOT 1
- Please add my server. Thanks! HOT 2
- AttributeError: 'Client' object has no attribute 'async_event' HOT 1
- No back to line (carriage return) in message HOT 6
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discord_feedbot.