Ticket #6797 (new defect)

Opened 2 years ago

Last modified 1 week ago

DailyLolMacro defunct

Reported by: bakker@textkernel.nl Assigned to: rjollos
Priority: lowest Component: DailyLolMacro
Severity: blocker Keywords: WikiMacroBase
Cc: Trac Release: 0.11

Description (Last modified by rjollos)

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

Change History

03/12/10 15:54:28 changed by insaneintenti0n

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.

03/12/10 16:20:42 changed by insaneintenti0n

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.

04/01/10 13:51:14 changed by roger@opq.se

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

08/27/10 20:53:49 changed by rjollos

  • owner changed from insaneintenti0n to rjollos.

08/27/10 21:20:27 changed by rjollos

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

08/27/10 21:22:20 changed by rjollos

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

08/27/10 21:34:24 changed by rjollos

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.

08/27/10 21:46:24 changed by insaneintenti0n

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.

08/28/10 04:35:52 changed by rjollos

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.

(follow-up: ↓ 11 ) 08/30/10 17:46:53 changed 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.

(in reply to: ↑ 10 ) 08/30/10 17:50:24 changed by insaneintenti0n

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.

11/20/10 06:00:14 changed by rjollos

  • description changed.

02/02/12 19:00:01 changed 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.

02/02/12 19:03:35 changed by insaneintenti0n

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


Add/Change #6797 (DailyLolMacro defunct)




Change Properties
Action