View unanswered posts | View active topics

Reply to topic  [ 4 posts ] 

Joined: Tue Jun 29, 2004 9:59 pm
Posts: 113
Post Another question about Webscrape (statics)
Please forgive me if I missed this in the documentation, but I looked for it.

Is there any way to use a static bit of text for any of the 3 required fields in the webscrape plugin? Obviously, you're always going to want to parse out the description text, but there are plenty of times when I might want to either leave the title or link blank or that I'd like to just fill them in with something generic.

As far as I can tell, including static text withing the (?P<L>.*?) area -- like before, after or instead of the ".*?" would tell the script to search for text i included. But since i want to substitute text rather than search for it, that's not going to work. Is there maybe a way to say use nothing? Maybe leaving the .*? out all together? That would solve some of my problems, but probably not all of them.


Thu Jul 01, 2004 9:32 pm
Profile ICQ

Joined: Sat Feb 08, 2003 8:36 pm
Posts: 247
Location: San Francisco, CA -- USA
Post 
Just offhand I can't think of a way to get static text into one of the three fields (T, L, D) Webscrape uses. However, you should be able to set any of them to the empty string like so:

(?P<T>)

This would set the item title to "".

I hope this helps.

Allan


Fri Jul 02, 2004 4:19 pm
Profile

Joined: Tue Jun 29, 2004 9:59 pm
Posts: 113
Post 
That definitely does help. Thank you.

I think I've still got a bit of regular expression and/or python research to do before I get a firm handle on webscrape. It's a great tool, but there are times when I apply it and just cannot get it to do what I want even though the patterns seem pretty simple.


Mon Jul 05, 2004 2:55 pm
Profile ICQ

Joined: Sat Feb 08, 2003 8:36 pm
Posts: 247
Location: San Francisco, CA -- USA
Post 
Don't feel bad -- getting even what should be simple regular expressions right can be a real pain! :(


Mon Jul 05, 2004 5:20 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online
Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron