Modify

Opened 15 years ago

Closed 8 years ago

#6797 closed defect (wontfix)

DailyLolMacro defunct

Reported by: bakker@… Owned by: Ryan J Ollos
Priority: lowest Component: DailyLolMacro
Severity: blocker Keywords: WikiMacroBase
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

DailyLolMacro not working at all:

2010-03-12 15:31:17,012 Trac[loader] ERROR: Failed to load plugin from /home/trac/plugins/DailyLolMacro.py: 
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/loader.py", line 91, in _load_py_files
    module = imp.load_source(plugin_name, plugin_file)
  File "/home/trac/plugins/DailyLolMacro.py", line 1, in ?
    class DailyLolMacro(WikiMacroBase):
NameError: name 'WikiMacroBase' is not defined

Attachments (0)

Change History (15)

comment:1 Changed 15 years ago by Brian

huh, I'll have to look into that.

I noticed the other day it wasn't picking the right pictures, that icanhascheezburger.com changed their layout again, but if it's not working at all, that's a problem.

I see you're on trac 0.11.6. I'm only at 11.3 so that might be the difference.

comment:2 Changed 15 years ago by Brian

Ok, I see the problem. I really should make an installer or something for this. I've just used it as a class to copy/paste into your existing macros.

It's obviously not going to work without

from trac.wiki.macros import WikiMacroBase

Who knows what else it's missing right now.

comment:3 Changed 15 years ago by roger@…

I had to add these lines to the script to make it work with newer versions of trac.

from trac.wiki.macros import WikiMacroBase
from genshi.builder import tag

comment:4 Changed 14 years ago by Ryan J Ollos

Owner: changed from Brian to Ryan J Ollos

comment:5 Changed 14 years ago by Ryan J Ollos

(In [8461]) Add revision info to macro, and add missing dependencies. Refs #6797, Fixes #6574.

comment:6 Changed 14 years ago by Ryan J Ollos

(In [8462]) Add revision info to macro, and add missing dependencies. Refs #6797, Fixes #6574.

comment:7 Changed 14 years ago by Ryan J Ollos

Looks like we need some way to parse up that page to retrieve the image. There are a bunch of images on the page so I don't see a simple way to do this.

comment:8 Changed 14 years ago by Brian

For a while they were using particular attributes In the HTML for the actual cat images. But I haven't seen that page in months to know what it looks like now. (iPhone apps spoil me, plus I'm responding on mine now anyway. :) ). Call it dead if you must. Maybe in the future I can take another stab at it.

comment:9 Changed 14 years ago by Ryan J Ollos

If you have time to look at the page and determine how we can locate the image or video, I'm happy to update the code. In the meantime, I'll add a note to the main page noting that it's broken.

comment:10 Changed 14 years ago by anonymous

For now, it looks like it's fixable (but I have no means for testing to try). All of the pictures have alt text that starts with "funny pictures-".

The source looks like this:

<img src='http://icanhascheezburger.files.wordpress/<image_location_and_name>' title="<title>" alt="funny pictures-<text>" />

So it shouldn't be TOO bad to parse the html for 'alt="funny pictures-' to pull out the .jpg on those lines.

comment:11 in reply to:  10 Changed 14 years ago by Brian

I always forget to log in... that was me.

Replying to anonymous:

For now, it looks like it's fixable (but I have no means for testing to try). All of the pictures have alt text that starts with "funny pictures-".

The source looks like this:

<img src='http://icanhascheezburger.files.wordpress/<image_location_and_name>' title="<title>" alt="funny pictures-<text>" />

So it shouldn't be TOO bad to parse the html for 'alt="funny pictures-' to pull out the .jpg on those lines.

comment:12 Changed 14 years ago by Ryan J Ollos

Description: modified (diff)

comment:13 Changed 13 years ago by anonymous

Instead of trying to dissect the HTML for the home page, wouldn't it be easier to pull the data from the RSS feed?

http://feeds.feedburner.com/ICanHasCheezburger?format=xml

The feed should be in a more consistent format, plus there's less extraneous information to have to worry about.

comment:14 Changed 13 years ago by Brian

I don't develop plugins for Trac anymore. You're more than welcome to re-write the plugin.

comment:15 Changed 8 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

Project has been removed.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.