vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Add-On Releases - DJ's AME (Auto Media Embedding) XML Media Definitions (Third Time's the Charm) (https://vborg.vbsupport.ru/showthread.php?t=175378)

marialaura94 11-20-2008 09:56 AM

Hello, I'like AME very much.
Do you cant help me? I need up videos of this site www.tn.com.ar
Pardon for my English...........

tspaetten 11-20-2008 06:47 PM

Hi there, first off thanx for a great mod.

I have installed it, but need to get pictures and videos from these two sites www.bold.dk & www.onside.dk

Can u please help me??

Raptor 11-21-2008 02:01 AM

The ame hack and the xml addons have to be one of the most useful hacks ever released for vb. My members love it - especially watching live sport from justin.tv feeds without leaving the forum :)

Can i request a site that is missing but is a very popular video such much like collegehumour and ebaums

www.liquidgeneration.com

Many thanks in advance

Digital Jedi 11-21-2008 04:07 AM

Quote:

Originally Posted by Dr.H (Post 1669169)
To get a locally hosted .flv file to embed with the flash definition do I have to convert it to .swf first? I put my site name in both places in the definition but when I post the all that happens is the link to the file shows.

Yes, the Flash (.SWF) definition is for files ending in .swf only. But I'll look into making one for .flv. It just hadn't occurred to me before. Note that I can't guarantee it will work, or how fast that will be. So you may want to go ahead with that conversion process if you can. However, I will look into when I get to my list again and in the order it was recieived.


Quote:

Originally Posted by marialaura94 (Post 1669246)
Hello, I'like AME very much.
Do you cant help me? I need up videos of this site www.tn.com.ar
Pardon for my English...........

Quote:

Originally Posted by tspaetten (Post 1669536)
Hi there, first off thanx for a great mod.

I have installed it, but need to get pictures and videos from these two sites www.bold.dk & www.onside.dk

Can u please help me??

Quote:

Originally Posted by Raptor (Post 1669759)
The ame hack and the xml addons have to be one of the most useful hacks ever released for vb. My members love it - especially watching live sport from justin.tv feeds without leaving the forum :)

Can i request a site that is missing but is a very popular video such much like collegehumour and ebaums

www.liquidgeneration.com

Many thanks in advance

I will look at all four of these sites and let you know. Bear in mind, since the list of definitions has gotten quite large, and that I go through requests in order most of the time, it may be some time before I get to them. But with that said, I do get to them, eventually.

Dr.H 11-22-2008 03:28 AM

I decided to run it as a locally hosted Quick time .mov instead which works fine but I can't get the video to show at full 1280x720 size. I did try changing the Quick Time definition replacement to that size but it still stayed at the smaller square size.. Any Idea how to make it show videos in full size?

Jaxel 11-22-2008 07:59 AM

I'm having a little trouble creating a definition for youtube HIGH DEFINITION (fmt=22, not fmt=18)

HD: http://www.youtube.com/watch?fmt=22&v=LQwC0t3rFAQ
SD: http://www.youtube.com/watch?v=LQwC0t3rFAQ

By adding fmt=22& to the URL, you can view 1280x720 versions of the videos in flash. I want to be able to let users add this code to their URL, and have the system read it no problem...

This is what I have tried:

HTML Code:

[http://]*[a-z]*?[\.]?youtube\.[a-z]*?/watch\?fmt=22\&v=([A-Z0-9._%-]*)[&\w;=\+_\-]*
HTML Code:

<object width="670" height="400">
<param name="movie" value="http://www.youtube.com/v/$p1&hl=en&fs=1&rel=0&ap=%2526fmt%3D22"></param>
<param name="allowFullScreen" value="true"></param>
<embed src="http://www.youtube.com/v/$p1&hl=en&fs=1&rel=0&ap=%2526fmt%3D22" type="application/x-shockwave-flash" allowfullscreen="true" width="670" height="400" wmode="transparent"></embed></object>

It APPEARS to work, using RegexBuddy... AME seems to read in and extract the destination data as well (it adds the title to the video) as in:

HTML Code:

[url="http://www.youtube.com/watch?fmt=22&v=LQwC0t3rFAQ"]YouTube - SoulcaliburIV: 2008-SEP-06 W1 SEB VS Jaxel[/url]
However, it does not print out the Replacement text. It prints out the URL to the video (not in a link, just plain text)... but nothing else. Why is the replacement not working?

Digital Jedi 11-22-2008 11:08 AM

Quote:

Originally Posted by Dr.H (Post 1670427)
I decided to run it as a locally hosted Quick time .mov instead which works fine but I can't get the video to show at full 1280x720 size. I did try changing the Quick Time definition replacement to that size but it still stayed at the smaller square size.. Any Idea how to make it show videos in full size?

So far, QuickTime videos are not resizable. And, to be truthful, I haven't been able to figure out why. This is the most recent information I've found on the subject, but I have not gotten a chance to test it out: http://lists.apple.com/archives/Quic.../msg00024.html


Quote:

Originally Posted by Jaxel (Post 1670512)
I'm having a little trouble creating a definition for youtube HIGH DEFINITION (fmt=22, not fmt=18)

HD: http://www.youtube.com/watch?fmt=22&v=LQwC0t3rFAQ
SD: http://www.youtube.com/watch?v=LQwC0t3rFAQ

By adding fmt=22& to the URL, you can view 1280x720 versions of the videos in flash. I want to be able to let users add this code to their URL, and have the system read it no problem...

This is what I have tried:

HTML Code:

[http://]*[a-z]*?[\.]?youtube\.[a-z]*?/watch\?fmt=22\&v=([A-Z0-9._%-]*)[&\w;=\+_\-]*
HTML Code:

<object width="670" height="400">
<param name="movie" value="http://www.youtube.com/v/$p1&hl=en&fs=1&rel=0&ap=%2526fmt%3D22"></param>
<param name="allowFullScreen" value="true"></param>
<embed src="http://www.youtube.com/v/$p1&hl=en&fs=1&rel=0&ap=%2526fmt%3D22" type="application/x-shockwave-flash" allowfullscreen="true" width="670" height="400" wmode="transparent"></embed></object>



It APPEARS to work, using RegexBuddy... AME seems to read in and extract the destination data as well (it adds the title to the video) as in:

HTML Code:

[url="http://www.youtube.com/watch?fmt=22&v=LQwC0t3rFAQ"]YouTube - SoulcaliburIV: 2008-SEP-06 W1 SEB VS Jaxel[/url]
However, it does not print out the Replacement text. It prints out the URL to the video (not in a link, just plain text)... but nothing else. Why is the replacement not working?

So that's how their handling HD now. That's good to know. That may change the way I handle the next update.

As to your question, this happens often. And most of the time it's because of the addition of the ampersand (&) in the RegEx. Have it match the HTML ampersand command instead, but make the command itself optional: &[amp;]* That should fix any parsing issues.

Jaxel 11-22-2008 12:42 PM

Yeah... the new HD stuff is great... check it!

http://www.8wayrun.com/video.php?do=...ls&videoid=109

limmengwei 11-22-2008 10:22 PM

Hi,
Thanks for the mod.
May I know is there a way for me to directly to embed Microsoft Powerpoint Presentations? or Apple Keynote Presentations?
Thanks for any advice.

zaimbat 11-24-2008 11:38 PM

I have a problem with the myspacetv parser: as I paste this link "http://vids.myspace.com/index.cfm?fuseaction=vids.individual&VideoID=77010 71" (this is just an example), on my board I get this:

Code:

<div style="display: none;" id="ame_noshow_post_1227576967_1">
        <a href="http://vids.myspace.com/index.cfm?fuseaction=vids.individual&amp;VideoID=7701071" title="MySpaceTV Videos:  WWE  The Undertaker's Entrance Video by Wolfokatar<br />
" target="_blank">MySpaceTV Videos:  WWE  The Undertaker's Entrance Video by Wolfokatar<br />
</a>
</div>
<div style="display: inline;" id="ame_doshow_post_1227576967_1">
<div align="center">
<table class="tborder" cellpadding="6" cellspacing="1" 640 style="margin:10px 0">
<thead>
        <tr>
                <td class="tcat" colspan="2" style="text-align:center">

                        <a href="http://vids.myspace.com/index.cfm?fuseaction=vids.individual&amp;VideoID=7701071" title="MySpaceTV Videos:  WWE  The Undertaker's Entrance Video by Wolfokatar<br />
" target="_blank">MySpaceTV Videos:  WWE  The Undertaker's Entrance Video by Wolfokatar<br />
</a>
                </td>
        </tr>
</thead>
<tbody>
        <tr>
                <td class="panelsurround" align="center">
<embed src="http://lads.myspace.com/videos/myspacetv_vplayer0005.swf" flashvars="m=7701071&amp;type=video" type="application/x-shockwave-flash" width="640" height="480" wmode="transparent"></embed>
</td>
        </tr>

</tbody>
</table></div>
</div>

But I see the the myspace logo rotating forever.. (the same logo you get if you browse this link: http://lads.myspace.com/videos/myspa...player0005.swf ).
I already tried removing old myspace wrapper and reinstalling the dj's ame's one..

Help?

Digital Jedi 11-25-2008 04:39 AM

Yes, this one is known. This is because MySpace changed their Embed Code from an iframe to actual embed code. This will be addressed in the next update.

MotMann 11-27-2008 08:53 AM

Quote:

You have to delete/disable your old definitions
I Have install the new AME an have right now Problems with the DJ's Master XML.xml to import.

How i can delete the old definitions, if i have install the new AME?

boandmichele 12-02-2008 05:59 PM

DJ! i have searched and searched for a solution before asking you, and im sure its something simple... but....

i have imported the amazon (links) definition, updated my tag appropriately, and none of the links are working. instead of pointing to amazon, it points back to my site with the amazon tag added on the end (which ends with me getting a database error). im using 2.5RC but have duplicated this in both 2 and 2.5. any advice?

to clarify, instead of giving me a link to amazon.com/asin/tag=xxxxx,

its giving me a link to ww.mysitegoeshere.com/forums/showthread.php?tag=xxxx

arg!

h2ojunkie 12-03-2008 08:46 PM

Just moving the post over to the right thread

Quote:

Originally Posted by Digital Jedi (Post 1675822)
We probably should discuss this in my Add-On thread after this, that's a good point. I forget where I am sometimes.

I understand what you mean now, and I don't think I recall seeing the embed code for thumbnails videos before. Yeah, it's parsing the URL of the video so the HTML for the thumbnails gets shattered. RegEx for BBCode is tricky, but not impossible I don't think. I'd just have to give it a try.





Quote:

Originally Posted by h2ojunkie (Post 1673856)
Maybe we aren't on the same page as you said.

I'm talking about a conversion specifically for the PB offered IMG Code - Forums & Bulletin Boards for videos.

When I tested the photobucket (videos) definition with:

[url=http://s73.photobucket.com/albums/i237/Whitey818/motorcycle%20related%20stuff/?action=view&current=100_2877.flv][img]https://vborg.vbsupport.ru/external/2008/12/103.jpg[/img][/url]


Here's the HTML rendered by the Photobucket (Videos) definition:
HTML Code:

<A title="<img src="
href="http://s73.photobucket.com/albums/i237/Whitey818/motorcycle%20related%20stuff/?action=view&amp;current=100_3043.flv"
alt="" border="0" th_100_3043.jpg? motorcycle%20related%20stuff Whitey818 i237
albums i73.photobucket.com http:>
" target="_blank"&gt;<IMG alt=""
src="http://i73.photobucket.com/albums/i237/Whitey818/motorcycle%20related%20stuff/th_100_3043.jpg"
border=0>
</A> </TD></TR></THEAD>
<TBODY>
<TR>
<TD class=panelsurround align=middle><EMBED
src=http://photobucket.com/player.swf?file=http://s73.photobucket.com/albums/i237/Whitey818/motorcycle%20related%20stuff/100_3043.flv
width=430 height=389 type=application/x-shockwave-flash
wmode="transparent">
</EMBED>

As you can see, I ended up with a broken layout. The page was rendering the default photobucket image that is shown for videos, followed by the video player rendered by your product.

I was assuming your Photobucket (Videos) definition was written just to do replacements on the url portion only, and wasn't designed to account for the embed code PB provides as shown above. (at least that's what the regex looked like)

I got the idea of adding support for the PB embed code from use of this mod:
https://vborg.vbsupport.ru/showthrea...ht=photobucket

It adds a photobucket image/video search and upload when making posts using:
http://photobucket.com/landing/plugin_wizard.php

And, if you search photobucket using that mod for a video, the only URL photo bucket gives you for the video via the IFRAME used by that mod, is the IMG code I listed above.

Anyway, I personally love that PB image search/upload since it gives an easy way for users to post videos to the site without having to allow users to upload attachments.

I had to shut off your Photobucket (Videos) definition since it broke the page whenever someone would use the PB code provided by the IFRAME uploader.

Hopefully, I'm explaining myself better this time.

Thanks again for a killer product.


Digital Jedi 12-04-2008 08:58 AM

Thanks Junkie. I will try to take a look at this for the next udpate.


Quote:

Originally Posted by MotMann (Post 1673903)
I Have install the new AME an have right now Problems with the DJ's Master XML.xml to import.

How i can delete the old definitions, if i have install the new AME?

Tick the Delete checkbox at the top of the Display Definitions page, then save.


Quote:

Originally Posted by boandmichele (Post 1677193)
DJ! i have searched and searched for a solution before asking you, and im sure its something simple... but....

i have imported the amazon (links) definition, updated my tag appropriately, and none of the links are working. instead of pointing to amazon, it points back to my site with the amazon tag added on the end (which ends with me getting a database error). im using 2.5RC but have duplicated this in both 2 and 2.5. any advice?

to clarify, instead of giving me a link to amazon.com/asin/tag=xxxxx,

its giving me a link to ww.mysitegoeshere.com/forums/showthread.php?tag=xxxx


arg!

For those having the linking problem with Amazon (Thumbnails), I have a temporary fix for you until the variable problem in AME can be pinpointed. It will not convert titles properly and will just read Amazon (Thumbnails) or whatever you've named it in the AME CP, but it will properly convert your URLs.

NOTE: If you need to add your own affiliate ID tag you must go in and change each instance of ?tag=citofgamonlco-20 to your own affiliate ID. There are three. If not, you won't hurt my feelings leaving it in. ;)

Oh, remember to delete your old one.

dasdingansich 12-07-2008 01:26 PM

hi,

I´m trying to build replacement code for ebay.de affiliate links, and I got stuck finding the right regex

I need to extract the sellers name from an URL, which usually looks like this:
http://shop.ebay.de/merchant/user_name

works perfectly fine with:
http://shop\.ebay\.de/merchant/([\.\w_-]+)
then I can use the sellers name as $p1

however, sometimes ebay puts thos "W0QQ" variables behind it, then it would look something like this:
http://shop.ebay.de/merchant/user_name_W0QQ_nkwZQQ_armrsZ1QQ_fromZQQ_mdoZ
I need "_W0QQ" and everything after that to be excluded from $p1

first I tried to create a break at the first instance of an underscore, but then I realized usernames can contain underscores as well.

thanks in advance!

Digital Jedi 12-07-2008 01:52 PM

Quote:

Originally Posted by dasdingansich (Post 1680233)
hi,

I?m trying to build replacement code for ebay.de affiliate links, and I got stuck finding the right regex

I need to extract the sellers name from an URL, which usually looks like this:
Code:

http://shop.ebay.de/merchant/user_name
works perfectly fine with:
Code:

http://shop\.ebay\.de/merchant/([\.\w_-]+)
then I can use the sellers name as $p1

however, sometimes ebay puts thos "W0QQ" variables behind it, then it would look something like this:
Code:

http://shop.ebay.de/merchant/user_name_W0QQ_nkwZQQ_armrsZ1QQ_fromZQQ_mdoZ
I need "_W0QQ" and everything after that to be excluded from $p1

first I tried to create a break at the first instance of an underscore, but then I realized usernames can contain underscores as well.

thanks in advance!

It's tricky when you run into an area you need grouped that can easily match the rest of the string. One thing you can do is check to see if the underscore in your grouping is absolutely necessary. If not, then you can easily put an optional word character match after your grouping: [\w_]*

If it is necessary, then try looking for the user name someplace else besides the URL string. Likely, it will be somewhere in the HTML of the page and you can make a ReGex match to that. In this case your grouping, the $p1 reference, will be in the Extraction regex instead.

dasdingansich 12-07-2008 04:43 PM

Quote:

Originally Posted by Digital Jedi (Post 1680246)
It's tricky when you run into an area you need grouped that can easily match the rest of the string. One thing you can do is check to see if the underscore in your grouping is absolutely necessary. If not, then you can easily put an optional word character match after your grouping: [\w_]*

If it is necessary, then try looking for the user name someplace else besides the URL string. Likely, it will be somewhere in the HTML of the page and you can make a ReGex match to that. In this case your grouping, the $p1 reference, will be in the Extraction regex instead.

good idea, thanks!
the username occurrs once between h1-tags on the target page, so this should do the trick:
<h1>([\.\w_-]+)</h1>

only Problem is, AME stops fetching the page content at the first occurrence of german vowel "?", which unfortunately appears right in the title.
please compare
http://shop.ebay.com/merchant/25cent-giraffes
http://shop.ebay.de/merchant/25cent-giraffes
the word "seller" in the page title becomes "Verk?ufer", and AME stops at "Verk", which in vbulletin results in this:

Quote:

[ame="http://shop.ebay.de/merchant/25cent-giraffes"]eBay Verk
it?s definately the vowel because it works perfectly with ebay.com, but that?s no good to me because they?re running an entirely different affiliate program. :(

Digital Jedi 12-07-2008 11:46 PM

Is it truncating the HTML output or just the title? Shouldn't you still be getting a valid URL?

wmlvb 12-08-2008 08:40 AM

Hi, I only have the latest version of AME installed and have not installed this add on. I am not sure if I am suppose to install the 12/08 update file or am to install the files in the 1st post and then the update file?

Digital Jedi 12-08-2008 12:19 PM

No, as I mentioned in the update notes, you only need the Master XML if you are just starting out.

Digital Jedi 12-08-2008 12:43 PM

Hi guys, just a little status update for you. Looking through my PMs, it looks like I've let a lot of requests fall by the wayside. This is because support for this thread, my other threads and my other web work is continually getting more demanding.

Over the course of this week, I'm going to be going through my PMs thoroughly to make sure I address any questions I may have overlooked. As a result of this, I'm going to ask that any future requests, questions or comments be made through my two respective threads, unless we're dealing with some private information. As it stands, I've just let things get out of hand, and I find I'm forgetting PMs much more easily then I used to. The linear nature of a thread, though, is much harder to ignore or forget, and way easier to search.

This will make it easier for me to keep track of things, and I'll be able to put things on a rough, but clearer schedule then I had before. In short, this will make support better. I appreciate your patience and will get back to you soon.

Stryker412 12-09-2008 11:50 AM

DJ, do the new HD/widescreen videos embed ok with Youtube or does that require an update?

Digital Jedi 12-09-2008 11:57 AM

They will require an update of some kind. I'm not sure what YouTube is up to yet with all the changes they've got going on over there. So I'm going to give them a few days to settle into whatever it is they're planning.

macc 12-11-2008 11:22 AM

hello!

need help with divx definitions!

this is my regular box expression
Quote:

([http://]*[\w]*[\.]*YOUR_SITE_NAME_HERE\.[\w/&;%-\.]+\.divx)
i have my divx file on my server (root) (http://libar-libar.com/test.divx )

what i must or need to change in regular box expression?

have vb 3.7.4 pl1 and cmps 3.0.1
regards

macc

Digital Jedi 12-11-2008 11:28 AM

Quote:

Originally Posted by macc (Post 1683044)
hello!

need help with divx definitions!

this is my regular box expression

i have my divx file on my server (root) (http://libar-libar.com/test.divx )

what i must or need to change in regular box expression?

have vb 3.7.4 pl1 and cmps 3.0.1
regards

macc

Ah, I see. Change YOUR_SITE_NAME_HERE to libar-libar. Don't put the .com. That should allow any video located in any of your sites root directories to embed.

macc 12-11-2008 11:47 AM

i make changes and works not - you can see there http://libar-libar.com/libar/vb/show...=2404#post2404

i put just like this in post - http://libar-libar.com/test.divx

key is " bidivx_videos_at_yoursitenameib " (should change here some?)
regards

macc

macc 12-11-2008 11:55 AM

get error message -" the downloaded file is not divx file " ... but file is divx file !


reg

macc

Digital Jedi 12-11-2008 12:03 PM

Quote:

Originally Posted by macc (Post 1683065)
i make changes and works not - you can see there http://libar-libar.com/libar/vb/show...=2404#post2404

i put just like this in post - http://libar-libar.com/test.divx

key is " bidivx_videos_at_yoursitenameib " (should change here some?)
regards

macc

I looks like DIVX may have updated their embed code recently. Let's try this. Open up your DIVX definition and change the Replacement HTML with this:

Code:


<object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="512" height="384" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab">
 <param name="custommode" value="none" />
  <param name="autoPlay" value="false" />
  <param name="src" value="$p1" />
<embed type="video/divx" src="$p1" custommode="none" width="512" height="384" autoPlay="false"  pluginspage="http://go.divx.com/plugin/download/">
</embed>
</object>


macc 12-11-2008 12:10 PM

did it but come same error message ... downloaded file is not divx file ....

i have youtube bbcode and one product (add youtube block in profile) - that is all my video codes ... now i have ame 2.5 rc1 and your mod for divx !

regards

macc

Digital Jedi 12-11-2008 12:10 PM

Hrm, I'm getting the same error message you reported here: http://labs.divx.com/WebPlayerCodeGenerator. There may be a problem with the file you've posted.

Let's try a smaller video from DIVX.com and see if that works. Try uploading the video in the ZIP file and see if that works any different.

macc 12-11-2008 12:19 PM

here is this test2.divx - http://libar-libar.com/libar/vb/show...=2405#post2405


works ... i hope ... it is few sec but work ...


my test.divx file is from here http://download.divx.com/divxlabs/Ap...20-12Mbps.divx
and i downloaded and just change name to test.divx and upload to my root!


reg

macc

edit: now is link for downloaded divx ok

Digital Jedi 12-11-2008 12:23 PM

Yup, that's working properly. Large DIVX files, at least in my experience, have a tendency to get corrupted easily. Try downloading the file again and see if you get the same error, because the modification appears to be working properly.

macc 12-11-2008 12:30 PM

i tested this link http://download.divx.com/divxlabs/Ap...20-12Mbps.divx on codegenerator and works fine (mean divx file )


i will try download again and upload again for test ...

thanks and regards

macc

realmr 12-16-2008 05:49 AM

can you add supernovatube.com into the list ?

dduane 12-16-2008 02:35 PM

Hey there! (waves "hi" from Ireland)

I've just installed AME2.0 on my vB 3.7.4. Works just fine without the additional definitions.

However, just downloaded the master XML definition list, and on attempting to import it using the AME cp, I'm getting:

"XML Error: no error at line 0"

Any thoughts as to what this might mean?

Thanks! -- D.

Digital Jedi 12-16-2008 10:26 PM

Quote:

Originally Posted by realmr (Post 1686417)
can you add supernovatube.com into the list ?

I'll add it to the list of sites to include, provided there are no problems getting it to work.


Quote:

Originally Posted by dduane (Post 1686679)
Hey there! (waves "hi" from Ireland)

I've just installed AME2.0 on my vB 3.7.4. Works just fine without the additional definitions.

However, just downloaded the master XML definition list, and on attempting to import it using the AME cp, I'm getting:

"XML Error: no error at line 0"

Any thoughts as to what this might mean?

Thanks! -- D.

I've not seen that before, but it could be the download got corrupted and you got an incomplete file. Try downloading it again.

Vitaly 12-20-2008 01:25 AM

DJ, may be i'm stupid, but what the hell does AME with ampersands in regular expressions? I need to define "&q=" pаttern in thе middle of URL. Somerthing like "(.+)(&q=)(.*)". But it trigger only when i set "(.+)(q=)(.*)". Tryed (.*)(&amp;q=)(.*) with the same result.

What's wrong? Pattern is 100% correct, and test samples pass ok in preg debugger. I've rolled back to 2.0.2 but situation is the same. Any ideas?

Link example:
http://www.google.ru/search?hl=ru&newwindow=1&q=%D0%BF%D0%BE%D0%B8%D1%8 1%D0%BA+%D0%B2+%D0%B3%D1%83%D0 %B3%D0%BB%D0%B5&btnG=%D0%9F%D0%BE%D0%B8%D1%81%D0%B A&lr=&aq=f&oq=

http://www\.google\.[\w]{2,4}/search\?(.+)(q=[\w\d%+]+)(.*) - works, but catches wrong parameter (&aq=f)

http://www\.google\.[\w]{2,4}/search\?(.+)(&q=[\w\d%+]+)(.*) - doesn't works (brokes parceing and even shows plaint text instead of link).

Digital Jedi 12-20-2008 02:55 AM

Is this the link? I notice there's a space in the one you posted.

http://www.google.ru/search?hl=ru&newwindow=1&q=%D0%BF%D0%BE%D0%B8%D1%8 1%D0%BA+%D0%B2+%D0%B3%D1%83%D0%B3%D0%BB%D0%B5&btnG =%D0%9F%D0%BE%D0%B8%D1%81%D0%BA&lr=&aq=f&oq=

For ampersands, I always have to use the ampersand command, but then make it optional: &[amp;]* I never get the links to parse unless I change all my ampersands to this.

Also, I avoid using brackets if I can. [\w]+ will match any of Google's extensions without going past the backslash /search?. Brackets have a tendency to cause a parsing error, which is what the problem with IGN definition was.

Try this instead. I presume your trying to get three groupings?

Code:

http://www\.google\.[\w]+/search\?(.+)(&[amp;]*q=)([\w&;=]*)

Vitaly 12-20-2008 01:53 PM

DJ, thanks a lot.

Your example was not exact, but very usefull. I've waisted 8 hours without it for experiments :)

&[apms;]*(q=... can skip spoilers between "&" and "q" but this one seems to works as required:

(?:&|&amp;)(q=...

Do I understand right, that preg must match BOTH link text and address in "URL"? Is it the reason, that pattern should allow both single "&" and encoded "&amp;" ?

I've attached "letmegooglethatforyou" macros. Enjoy! type any URL with google search results and see what happens :) . Expression can be a bit improved, will do it later.

In nearest days will see, as promissed, what can i fo with google maps.


All times are GMT. The time now is 10:36 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02145 seconds
  • Memory Usage 1,917KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (7)bbcode_html_printable
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete