Author Topic: Use BING as default search result  (Read 5455 times)

0 Members and 1 Guest are viewing this topic.

Offline pra15

  • Power User
  • ****
  • Posts: 164
    • View Profile
Use BING as default search result
« on: January 25, 2012, 07:40:06 am »
Hello,
Here is a little script to use BING for site who doesn't support a search page like egafd.com.

It's an exemple and we can improve it but if someone is interesting....

I use www.egafd.com for exemple but you can change the const SiteSearch and put what you want. (in the declaration at start)

[attachment deleted by admin]

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: Use BING as default search result
« Reply #1 on: January 25, 2012, 08:50:36 am »
Hello,
Here is a little script to use BING for site who doesn't support a search page like egafd.com.

It's an exemple and we can improve it but if someone is interesting....

I use www.egafd.com for exemple but you can change the const SiteSearch and put what you want. (in the declaration at start)

Interestingly, very commendable, thanks pra15.
This would also occur search on web site http://bgafd.co.uk , because they are similar(in particular there English movies and actresses) information as to www.egafd.com .
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: Use BING as default search result
« Reply #2 on: January 25, 2012, 09:30:39 am »
Question:
Would it be possible to search more than one URL, for example, at the same time as URL address  for www.egafd.com , also this URL for http://bgafd.co.uk.
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline pra15

  • Power User
  • ****
  • Posts: 164
    • View Profile
Re: Use BING as default search result
« Reply #3 on: January 25, 2012, 08:59:40 pm »
I think it's not possible directly in the site BING, but we can add a link in the first prlist result a link to search in BING with the second site.
When i'll have more time i'll see that!

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: Use BING as default search result
« Reply #4 on: January 26, 2012, 06:59:01 am »
I think it's not possible directly in the site BING, but we can add a link in the first prlist result a link to search in BING with the second site.
When i'll have more time i'll see that!

Thank you.
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline pra15

  • Power User
  • ****
  • Posts: 164
    • View Profile
Re: Use BING as default search result
« Reply #5 on: January 26, 2012, 04:14:11 pm »
Here a script where you can search in different Site.
The constante SiteSearch is the first site where Bing search.
After you can add other site in variable TabSite (ex: TabSite:=[ 'www.a.com', 'www.b.com'])
After the first search you'll have links for other search in the result prList.

I found only this method to use many sites.
But if someone have an idea?

Now to improve this, we must find infos about a link in the Bing page to show them in the prlist.

[attachment deleted by admin]
« Last Edit: January 26, 2012, 04:17:52 pm by pra15 »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: Use BING as default search result
« Reply #6 on: January 26, 2012, 05:11:07 pm »
Here a script where you can search in different Site.
The constante SiteSearch is the first site where Bing search.
After you can add other site in variable TabSite (ex: TabSite:=[ 'www.a.com', 'www.b.com'])
After the first search you'll have links for other search in the result prList.

I found only this method to use many sites.
But if someone have an idea?

Now to improve this, we must find infos about a link in the Bing page to show them in the prlist.

Thank you, pra15.
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: Use BING as default search result
« Reply #7 on: February 09, 2012, 07:07:50 am »
Here is script for multi web search for the people.

[attachment deleted by admin]
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: Use BING as default search result
« Reply #8 on: February 09, 2012, 07:08:38 am »
Here is script for multi web search for the people.

Default SiteSearch
Code: [Select]
SiteSearch = 'www.imdb.com';  // Change the site as your choice
TabSite
Code: [Select]
//---------- Procedure SearchResults ----------//
// Create list of movies found during the search
procedure SearchResults (HTML : String);
Var
CurPos, PosStart, EndPos : integer;
URLposStart, URLPosEnd : integer;
StartURL, URL : String;

Begin
  //List of other site where search page :
  TabSite := ['www.imdb.com', 'www.allmusic.com', 'www.allrovi.com'
  , 'www.filmweb.pl/film', 'www.filmweb.pl/person'];
 
  //Search Result in actual page :

[attachment deleted by admin]
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: Use BING as default search result
« Reply #9 on: February 22, 2012, 11:24:20 am »
Here is script for multi web search for the people.

Default SiteSearch
Code: [Select]
SiteSearch = 'www.imdb.com';  // Change the site as your choice
TabSite
Code: [Select]
//---------- Procedure SearchResults ----------//
// Create list of movies found during the search
procedure SearchResults (HTML : String);
Var
CurPos, PosStart, EndPos : integer;
URLposStart, URLPosEnd : integer;
StartURL, URL : String;

Begin
  //List of other site where search page :
  TabSite := ['www.imdb.com', 'www.allmusic.com', 'www.allrovi.com'
  , 'www.filmweb.pl/film', 'www.filmweb.pl/person'];
 
  //Search Result in actual page :

version 0.0.0.3
Change:

Code: [Select]
Begin
  //List of other site where search page :
  TabSite := ['www.imdb.com/name', 'www.allmusic.com', 'www.allrovi.com/name'
  , 'www.allmovie.com/artist', 'www.filmweb.pl/person', 'www.kinopoisk.ru/level/4'];
 
  //Search Result in actual page :
Now the search is only for people.


[attachment deleted by admin]
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline pra15

  • Power User
  • ****
  • Posts: 164
    • View Profile
Re: Use BING as default search result
« Reply #10 on: March 02, 2012, 02:25:48 pm »
Thanks

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: Use BING as default search result
« Reply #11 on: March 02, 2012, 05:10:38 pm »
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: Use BING as default search result
« Reply #12 on: June 29, 2012, 02:50:47 pm »
None of these scripts does not work anymore. There have been major changes in the search results (major changes in source code page). I tried to fix it, but without success.
Maybe someone can help solve the problem.
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: Use BING as default search result
« Reply #13 on: July 03, 2012, 10:42:41 am »
None of these scripts does not work anymore. There have been major changes in the search results (major changes in source code page). I tried to fix it, but without success.
Maybe someone can help solve the problem.

I fixed search results in attached Scripts:

Bing_SearchMulti version 0.0.0.2
Bing_SearchMulti(people)(Imdb)  version 0.0.0.4

and new Bing_SearchMulti_All   version 0.0.0.2




[attachment deleted by admin]
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: Use BING as default search result
« Reply #14 on: September 21, 2014, 04:01:12 pm »
I fixed search results in attached Bing_SearchMulti Script:

Bing_SearchMulti version 0.0.0.3 -  Primary script

Code: [Select]
//---------- Procedure SearchResults ----------//
// Create list of movies found during the search
procedure SearchResults (HTML : String);
Var
CurPos, PosStart, EndPos : integer;
URLposStart, URLPosEnd : integer;
StartURL, Title, URL : String;

Begin
  //List of other site where search page :
  TabSite := ['www.bgafd.com', 'www.iafd.com', 'www.imdb.com'];
 
  //Search Result in actual page :
  StartURL := '<a href="http://' + SiteSearch;
   CurPos := Pos(StartURL, HTML);
   
   If Curpos > 0 then begin
      EndPos := Curpos;
     
      While (curpos > 0) AND (curpos < PosFrom('<![CDATA[', HTML, Endpos)) do begin
        EndPos:= Curpos;
        URLposStart := Curpos + 9;
        URLPosEnd := PosFrom('" h="', HTML, URLposStart);
        URL := Copy(HTML, URLPosStart, (URLposEnd-URLposStart));
curPos := PosFrom('">', HTML, curPos)+2;
endPos := PosFrom('</h2>', HTML, curPos);
Title := RemoveTags(Trim(Copy(HTML, curPos, endPos - curPos)), false);
        AddSearchResult(URL, Title, '', LowerCase(URL), '');   
        curpos := PosFrom(StartURL, HTML, URLPosEnd);
      End;
  //Add Links to Page with other sites in TabSite:
    For I := Low(TabSite) to High(TabSite) do
    Begin
    URL := 'www.bing.com/Search?q=site%3A' + TabSite[I] + '+%20' + MovieName;
    AddSearchResult('Search in :', TabSite[I],'',LowerCase(URL),'');
    end;
   End;
   
End;
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: Use BING as default search result
« Reply #15 on: September 21, 2014, 04:03:51 pm »
I fixed search results in attached Bing_SearchMulti_All Script:

Bing_SearchMulti_All version 0.0.0.3  -  Script for search multi site(pages)

Code: [Select]
//---------- Procedure SearchResults ----------//
// Create list of movies found during the search
procedure SearchResults (HTML : String);
Var
CurPos, PosStart, EndPos : integer;
URLposStart, URLPosEnd : integer;
StartURL, Title, URL : String;

Begin
  //List of other site where search page :
  TabSite := ['www.imdb.com/', 'www.allmusic.com/', 'www.allmovie.com/',
  'www.moviemeter.nl/film/', 'www.filmweb.pl/film/', 'www.filmweb.pl/person/'];
 
  //Search Result in actual page :
  StartURL := '<a href="http://' + SiteSearch;
   CurPos := Pos(StartURL, HTML);
   
   If Curpos > 0 then begin
      EndPos := Curpos;
     
      While (curpos > 0) AND (curpos < PosFrom('<![CDATA[', HTML, Endpos)) do begin
        EndPos:= Curpos;
        URLposStart := Curpos + 9;
        URLPosEnd := PosFrom('" h="', HTML, URLposStart);
        URL := Copy(HTML, URLPosStart, (URLposEnd-URLposStart));
curPos := PosFrom('">', HTML, curPos)+2;
endPos := PosFrom('</h2>', HTML, curPos);
Title := RemoveTags(Trim(Copy(HTML, curPos, endPos - curPos)), false);
        AddSearchResult(URL, Title, '', LowerCase(URL), '');   
        curpos := PosFrom(StartURL, HTML, URLPosEnd);
      End;
  //Add Links to Page with other sites in TabSite:
    For I := Low(TabSite) to High(TabSite) do
    Begin
    URL := 'www.bing.com/Search?q=site%3A' + TabSite[I] + '+%20' + MovieName;
    AddSearchResult('Search in :', TabSite[I],'',LowerCase(URL),'');
    end;
   End;
   
End;
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: Use BING as default search result
« Reply #16 on: September 21, 2014, 04:07:55 pm »
I fixed search results in attached Bing_SearchMulti(people) Script:

Bing_SearchMulti(people)  version 0.0.0.4  -  Script for search people multi site(pages)

Code: [Select]
//---------- Procedure SearchResults ----------//
// Create list of movies found during the search
procedure SearchResults (HTML : String);
Var
CurPos, PosStart, EndPos : integer;
URLposStart, URLPosEnd : integer;
StartURL, Title, URL : String;

Begin
  //List of other site where search page :
  TabSite := ['www.imdb.com/name/', 'www.allmusic.com/artist/', 'www.allmusic.com/album/',
  'www.allmovie.com/artist/', 'www.filmweb.pl/person/', 'www.kinopoisk.ru/level/4/people/'];
 
  //Search Result in actual page :
  StartURL := '<h2><a href="http://' + SiteSearch;
   CurPos := Pos(StartURL, HTML);
   
   If Curpos > 0 then begin
      EndPos := Curpos;
     
      While (curpos > 0) AND (curpos < PosFrom('<![CDATA[', HTML, Endpos)) do begin
        EndPos:= Curpos;
        URLposStart := Curpos + 13;
        URLPosEnd := PosFrom('" h="', HTML, URLposStart);
        URL := Copy(HTML, URLPosStart, (URLposEnd-URLposStart));
curPos := PosFrom('">', HTML, curPos)+2;
endPos := PosFrom('</h2>', HTML, curPos);
Title := RemoveTags(Trim(Copy(HTML, curPos, endPos - curPos)), false);
        AddSearchResult(URL, Title, '', LowerCase(URL), ''); 
        curpos := PosFrom(StartURL, HTML, URLPosEnd);
      End;
  //Add Links to Page with other sites in TabSite:
    For I := Low(TabSite) to High(TabSite) do
    Begin
    URL := 'www.bing.com/Search?q=site%3a' + TabSite[I] + PeopleName+'%s';
    AddSearchResult('Search in :', TabSite[I],'',LowerCase(URL),'');
    end;
   End;
   
End;
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 1898
    • View Profile
Re: Use BING as default search result
« Reply #17 on: September 21, 2014, 04:08:21 pm »
I fixed search results in attached Bing_SearchMulti(people)(Imdb) Script:

Bing_SearchMulti(people)(Imdb)  version 0.0.0.5  -  Script for search only Imdb People site

Code: [Select]
//---------- Procedure SearchResults ----------//
// Create list of movies found during the search
procedure SearchResults (HTML : String);
Var
CurPos, PosStart, EndPos : integer;
URLposStart, URLPosEnd : integer;
StartURL, Title, URL : String;

Begin
  //List of other site where search page :
  TabSite := ['www.imdb.com/name/'];
 
  //Search Result in actual page :
  StartURL := '<h2><a href="http://' + SiteSearch;
   CurPos := Pos(StartURL, HTML);
   
   If Curpos > 0 then begin
      EndPos := Curpos;
     
      While (curpos > 0) AND (curpos < PosFrom('<![CDATA[', HTML, Endpos)) do begin
        EndPos:= Curpos;
        URLposStart := Curpos + 13;
        URLPosEnd := PosFrom('" h="', HTML, URLposStart);
        URL := Copy(HTML, URLPosStart, (URLposEnd-URLposStart));
curPos := PosFrom('">', HTML, curPos)+2;
endPos := PosFrom('</h2>', HTML, curPos);
Title := RemoveTags(Trim(Copy(HTML, curPos, endPos - curPos)), false);
        AddSearchResult(URL, Title, '', LowerCase(URL), '');   
        curpos := PosFrom(StartURL, HTML, URLPosEnd);
      End;
  //Add Links to Page with other sites in TabSite:
    For I := Low(TabSite) to High(TabSite) do
    Begin
    URL := 'www.bing.com/Search?q=site%3a' + TabSite[I] + PeopleName+'%s';
    AddSearchResult('Search in :', TabSite[I],'',LowerCase(URL),'');
    end;
   End;
   
End;
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


 

anything