[Pkg-gourmet-changes] gourmet/src/lib/importers/html_plugins
__init__.py, 1.1.1.1, 1.2 epicurious.py, 1.1.1.1, 1.2
seanius at haydn.debian.org
seanius at haydn.debian.org
Tue Sep 20 15:06:02 UTC 2005
- Previous message: [Pkg-gourmet-changes]
gourmet/src/lib/exporters exporter.py, 1.1.1.1,
1.2 gnomeprinter.py, 1.1.1.1, 1.2 gxml2_exporter.py, 1.1.1.1,
1.2 gxml_exporter.py, 1.1.1.1, 1.2 recipe_emailer.py, 1.2,
1.3 rtf_exporter.py, 1.1.1.1, 1.2 wxprinter.py, 1.1.1.1, 1.2
- Next message: [Pkg-gourmet-changes]
gourmet/src/lib/importers __init__.py, 1.1.1.1,
1.2 gxml2_importer.py, 1.1.1.1, 1.2 gxml_importer.py, 1.1.1.1,
1.2 html_importer.py, 1.1.1.1, 1.2 importer.py, 1.1.1.1,
1.2 krecipe_importer.py, 1.1.1.1, 1.2 mastercook_importer.py,
1.1.1.1, 1.2 mastercook_plaintext_importer.py, 1.1.1.1,
1.2 mealmaster_importer.py, 1.1.1.1, 1.2 plaintext_importer.py,
1.1.1.1, 1.2 xml_importer.py, 1.1.1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/pkg-gourmet/gourmet/src/lib/importers/html_plugins
In directory haydn:/org/alioth.debian.org/chroot/home/users/seanius/tmp/cvs-serv30504/src/lib/importers/html_plugins
Modified Files:
__init__.py epicurious.py
Log Message:
update for upstream source to 0.8.6.5.1
Index: __init__.py
===================================================================
RCS file: /cvsroot/pkg-gourmet/gourmet/src/lib/importers/html_plugins/__init__.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- __init__.py 5 Sep 2005 00:19:44 -0000 1.1.1.1
+++ __init__.py 20 Sep 2005 15:05:52 -0000 1.2
@@ -161,8 +161,8 @@
print 'here we go...'
d=html_importer.scrape_url(url)
print d, 'type: ',type(d)
- print '---------------'
- if (not d) or (not isinstance(d,dic)):
+ print '---------------'
+ if (not d) or (not isinstance(d,dict)):
print 'Failed to import'
print 'd=',d,'(',type(d),')'
keep_going=raw_input('import another website? (y or n)')
@@ -171,7 +171,7 @@
break
for k,v in d.items():
if k=='image' and v:
- display_image = raw_input('Display image? (yes or no):').lower()
+ display_image = raw_input('Display image %s? (yes or no):'%v).lower()
if display_image=='y' or display_image=='yes':
ofi = open('/tmp/gourmet_image_test','w')
ofi.write(html_importer.get_image_from_tag(v,url))
Index: epicurious.py
===================================================================
RCS file: /cvsroot/pkg-gourmet/gourmet/src/lib/importers/html_plugins/epicurious.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- epicurious.py 5 Sep 2005 00:19:44 -0000 1.1.1.1
+++ epicurious.py 20 Sep 2005 15:05:52 -0000 1.2
@@ -35,6 +35,14 @@
'attributes':{'class':'recipehed'},}],
'text',
lambda s,t: s.capitalize()],
+ # we add one more title rule...
+ ['title',
+ [{'tag':'title',
+ },],
+ 'text',
+ # strip off the epicurious chunk at the end
+ ('(.*)\s*Recipe at Epicurious.com',False)
+ ],
# we add a new title element -- the previous markup seems outdated
# but I'll keep it around in case it's used on some of their old
# pages or comes back (7/25/05)
- Previous message: [Pkg-gourmet-changes]
gourmet/src/lib/exporters exporter.py, 1.1.1.1,
1.2 gnomeprinter.py, 1.1.1.1, 1.2 gxml2_exporter.py, 1.1.1.1,
1.2 gxml_exporter.py, 1.1.1.1, 1.2 recipe_emailer.py, 1.2,
1.3 rtf_exporter.py, 1.1.1.1, 1.2 wxprinter.py, 1.1.1.1, 1.2
- Next message: [Pkg-gourmet-changes]
gourmet/src/lib/importers __init__.py, 1.1.1.1,
1.2 gxml2_importer.py, 1.1.1.1, 1.2 gxml_importer.py, 1.1.1.1,
1.2 html_importer.py, 1.1.1.1, 1.2 importer.py, 1.1.1.1,
1.2 krecipe_importer.py, 1.1.1.1, 1.2 mastercook_importer.py,
1.1.1.1, 1.2 mastercook_plaintext_importer.py, 1.1.1.1,
1.2 mealmaster_importer.py, 1.1.1.1, 1.2 plaintext_importer.py,
1.1.1.1, 1.2 xml_importer.py, 1.1.1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Pkg-gourmet-changes
mailing list